Merge pull request #8143 from mxpv/log

Add Fields type alias to log package
This commit is contained in:
Fu Wei
2023-02-21 10:22:23 +08:00
committed by GitHub
21 changed files with 35 additions and 46 deletions

View File

@@ -325,7 +325,7 @@ func run(ctx context.Context, manager Manager, initFunc Init, name string, confi
if debugFlag {
logrus.SetLevel(logrus.DebugLevel)
}
logger := log.G(ctx).WithFields(logrus.Fields{
logger := log.G(ctx).WithFields(log.Fields{
"pid": os.Getpid(),
"namespace": namespaceFlag,
})
@@ -504,7 +504,7 @@ func serve(ctx context.Context, server *ttrpc.Server, signals chan os.Signal, sh
log.G(ctx).WithError(err).Fatal("containerd-shim: ttrpc server failure")
}
}()
logger := log.G(ctx).WithFields(logrus.Fields{
logger := log.G(ctx).WithFields(log.Fields{
"pid": os.Getpid(),
"path": path,
"namespace": namespaceFlag,