# README
log is a simple logrus helper to allow attaching a logrus.Entry to a context.Context.
// Create a ctx that carries a logrus.Entry with field "cmd" indicating the executable being run
ctx := log.WithField(ctx, "cmd", os.Args[0])
ctx = log.WithFields(ctx,WithFields(parent,
logrus.Fields{
"pid": os.Getpid(),
"uid": os.Getuid(),
},
)
// Log with the Entry from the ctx
log.Entry(ctx).Info("Informational log")
# Functions
Entry - returns *logrus.Entry for context.
WithField - return new context with {key:value} added to Context's logrus.Entry.
WithFields - return new context with fields added to Context's logrus.Entry.