Remove unwanted logs (#6708)

This commit is contained in:
kannappanr 2018-10-26 14:41:25 -07:00 committed by GitHub
parent 3f643acb99
commit 6869f6d9dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 14 deletions

View File

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

View File

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

View File

@ -266,8 +266,8 @@ func (api objectAPIHandlers) SelectObjectContentHandler(w http.ResponseWriter, r
// Executes the query on data-set
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 {

View File

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

View File

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