Create logger package and rename errorIf to LogIf (#5678)

Removing message from error logging
Replace errors.Trace with LogIf
This commit is contained in:
kannappanr
2018-04-05 15:04:40 -07:00
committed by GitHub
parent 91fd8ffeb7
commit f8a3fd0c2a
119 changed files with 2608 additions and 1860 deletions

View File

@@ -17,6 +17,7 @@
package cmd
import (
"context"
"encoding/hex"
"fmt"
"path"
@@ -24,7 +25,7 @@ import (
"strings"
"unicode/utf8"
"github.com/minio/minio/pkg/errors"
"github.com/minio/minio/cmd/logger"
"github.com/skyrings/skyring-common/tools/uuid"
)
@@ -174,12 +175,13 @@ func mustGetUUID() string {
}
// Create an s3 compatible MD5sum for complete multipart transaction.
func getCompleteMultipartMD5(parts []CompletePart) (string, error) {
func getCompleteMultipartMD5(ctx context.Context, parts []CompletePart) (string, error) {
var finalMD5Bytes []byte
for _, part := range parts {
md5Bytes, err := hex.DecodeString(part.ETag)
if err != nil {
return "", errors.Trace(err)
logger.LogIf(ctx, err)
return "", err
}
finalMD5Bytes = append(finalMD5Bytes, md5Bytes...)
}