-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
logger := log.NewLogfmtLogger(os.Stderr)
logger = log.NewContext(logger).With("caller", log.DefaultCaller)
lvlLogger := levels.New(logger)
lvlLogger.Info("hi", "there")
In the output you will get: caller=levels.go:72
This is fixed by using log.Caller(4) instead of log.DefaultCaller but makes passing and extending the logger harder than it should be.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels