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,10 +17,11 @@
package cmd
import (
"context"
"path/filepath"
"time"
"github.com/minio/minio/pkg/errors"
"github.com/minio/minio/cmd/logger"
)
// commonTime returns a maximally occurring time from a list of time.
@@ -150,7 +151,7 @@ func getLatestXLMeta(partsMetadata []xlMetaV1, errs []error) (xlMetaV1, int) {
//
// - non-nil error if any of the disks failed unexpectedly (i.e. error
// other than file not found and not a checksum error).
func disksWithAllParts(onlineDisks []StorageAPI, partsMetadata []xlMetaV1, errs []error, bucket,
func disksWithAllParts(ctx context.Context, onlineDisks []StorageAPI, partsMetadata []xlMetaV1, errs []error, bucket,
object string) ([]StorageAPI, []error, error) {
availableDisks := make([]StorageAPI, len(onlineDisks))
@@ -182,8 +183,9 @@ func disksWithAllParts(onlineDisks []StorageAPI, partsMetadata []xlMetaV1, errs
dataErrs[i] = hErr
break
case hErr != nil:
logger.LogIf(ctx, hErr)
// abort on unhandled errors
return nil, nil, errors.Trace(hErr)
return nil, nil, hErr
}
}