feat(logger): add a new field category in the log

This commit is contained in:
Tommy PAGEARD 2020-07-03 12:42:10 +02:00
parent 14bc5ab47f
commit 121623bc02

View File

@ -350,9 +350,10 @@ func (g *Group) load(ctx context.Context, key string, dest Sink) (value ByteView
if logger != nil {
logger.WithFields(logrus.Fields{
"err": err,
"key": key,
}).Error("groupcache: error retrieving key from peers")
"err": err,
"key": key,
"category": "groupcache",
}).Error("error retrieving key from peers")
}
g.Stats.PeerErrors.Add(1)