mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Create logger package and rename errorIf to LogIf (#5678)
Removing message from error logging Replace errors.Trace with LogIf
This commit is contained in:
@@ -19,10 +19,13 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
)
|
||||
|
||||
// Return all the entries at the directory dirPath.
|
||||
@@ -57,7 +60,9 @@ func readDir(dirPath string) (entries []string, err error) {
|
||||
var st os.FileInfo
|
||||
st, err = os.Stat((path.Join(dirPath, fi.Name())))
|
||||
if err != nil {
|
||||
errorIf(err, "Unable to stat path %s", path.Join(dirPath, fi.Name()))
|
||||
reqInfo := (&logger.ReqInfo{}).AppendTags("path", path.Join(dirPath, fi.Name()))
|
||||
ctx := logger.SetReqInfo(context.Background(), reqInfo)
|
||||
logger.LogIf(ctx, err)
|
||||
continue
|
||||
}
|
||||
// Append to entries if symbolic link exists and is valid.
|
||||
|
||||
Reference in New Issue
Block a user