Remove unwanted logs (#6708)

master
kannappanr 6 years ago committed by GitHub
parent 3f643acb99
commit 6869f6d9dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/gateway/s3/gateway-s3.go
  2. 2
      cmd/logger/logger.go
  3. 4
      cmd/object-handlers.go
  4. 1
      cmd/xl-v1-bucket.go
  5. 8
      cmd/xl-v1-multipart.go

@ -377,7 +377,6 @@ func (l *s3Objects) GetObject(ctx context.Context, bucket string, key string, st
if startOffset >= 0 && length >= 0 { if startOffset >= 0 && length >= 0 {
if err := opts.SetRange(startOffset, startOffset+length-1); err != nil { if err := opts.SetRange(startOffset, startOffset+length-1); err != nil {
logger.LogIf(ctx, err)
return minio.ErrorRespToObjectError(err, bucket, key) return minio.ErrorRespToObjectError(err, bucket, key)
} }
} }
@ -388,7 +387,6 @@ func (l *s3Objects) GetObject(ctx context.Context, bucket string, key string, st
defer object.Close() defer object.Close()
if _, err := io.Copy(writer, object); err != nil { if _, err := io.Copy(writer, object); err != nil {
logger.LogIf(ctx, err)
return minio.ErrorRespToObjectError(err, bucket, key) return minio.ErrorRespToObjectError(err, bucket, key)
} }
return nil return nil

@ -320,7 +320,7 @@ func logIf(ctx context.Context, err error) {
} }
// Get full stack trace // Get full stack trace
trace := getTrace(2) trace := getTrace(3)
// Get the cause for the Error // Get the cause for the Error
message := err.Error() message := err.Error()

@ -266,8 +266,8 @@ func (api objectAPIHandlers) SelectObjectContentHandler(w http.ResponseWriter, r
// Executes the query on data-set // Executes the query on data-set
if err = s3select.Execute(w, s3s); err != nil { if err = s3select.Execute(w, s3s); err != nil {
logger.LogIf(ctx, err) writeErrorResponse(w, toAPIErrorCode(err), r.URL)
return
} }
for k, v := range objInfo.UserDefined { for k, v := range objInfo.UserDefined {

@ -244,7 +244,6 @@ func (xl xlObjects) DeleteBucket(ctx context.Context, bucket string) error {
err := disk.DeleteVol(bucket) err := disk.DeleteVol(bucket)
if err != nil { if err != nil {
logger.LogIf(ctx, err)
dErrs[index] = err dErrs[index] = err
return return
} }

@ -385,7 +385,6 @@ func (xl xlObjects) PutObjectPart(ctx context.Context, bucket, object, uploadID
// Should return IncompleteBody{} error when reader has fewer bytes // Should return IncompleteBody{} error when reader has fewer bytes
// than specified in request header. // than specified in request header.
if n < data.Size() { if n < data.Size() {
logger.LogIf(ctx, IncompleteBody{})
return pi, IncompleteBody{} return pi, IncompleteBody{}
} }
@ -655,7 +654,6 @@ func (xl xlObjects) CompleteMultipartUpload(ctx context.Context, bucket string,
PartNumber: part.PartNumber, PartNumber: part.PartNumber,
GotETag: part.ETag, GotETag: part.ETag,
} }
logger.LogIf(ctx, invp)
return oi, invp return oi, invp
} }
@ -666,17 +664,11 @@ func (xl xlObjects) CompleteMultipartUpload(ctx context.Context, bucket string,
ExpETag: currentXLMeta.Parts[partIdx].ETag, ExpETag: currentXLMeta.Parts[partIdx].ETag,
GotETag: part.ETag, GotETag: part.ETag,
} }
logger.LogIf(ctx, invp)
return oi, invp return oi, invp
} }
// All parts except the last part has to be atleast 5MB. // All parts except the last part has to be atleast 5MB.
if (i < len(parts)-1) && !isMinAllowedPartSize(currentXLMeta.Parts[partIdx].ActualSize) { if (i < len(parts)-1) && !isMinAllowedPartSize(currentXLMeta.Parts[partIdx].ActualSize) {
logger.LogIf(ctx, PartTooSmall{
PartNumber: part.PartNumber,
PartSize: currentXLMeta.Parts[partIdx].ActualSize,
PartETag: part.ETag,
})
return oi, PartTooSmall{ return oi, PartTooSmall{
PartNumber: part.PartNumber, PartNumber: part.PartNumber,
PartSize: currentXLMeta.Parts[partIdx].ActualSize, PartSize: currentXLMeta.Parts[partIdx].ActualSize,

Loading…
Cancel
Save