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"
"io"
"io/ioutil"
@@ -30,6 +31,7 @@ import (
"syscall"
humanize "github.com/dustin/go-humanize"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/disk"
)
@@ -75,7 +77,7 @@ func isDirEmpty(dirname string) bool {
f, err := os.Open((dirname))
if err != nil {
if !os.IsNotExist(err) {
errorIf(err, "Unable to access directory")
logger.LogIf(context.Background(), err)
}
return false
@@ -85,7 +87,7 @@ func isDirEmpty(dirname string) bool {
_, err = f.Readdirnames(1)
if err != io.EOF {
if !os.IsNotExist(err) {
errorIf(err, "Unable to list directory")
logger.LogIf(context.Background(), err)
}
return false