forked from TrueCloudLab/frostfs-node
[#1437] logger: Use context to log trace id
Signed-off-by: Dmitrii Stepanov
This commit is contained in:
parent
fd004add00
commit
c16dae8b4d
3 changed files with 59 additions and 8 deletions
|
@ -11,9 +11,10 @@ import (
|
|||
|
||||
// NewLogger creates a new logger.
|
||||
func NewLogger(t testing.TB) *logger.Logger {
|
||||
var l logger.Logger
|
||||
l.Logger = zaptest.NewLogger(t,
|
||||
zaptest.Level(zapcore.DebugLevel),
|
||||
zaptest.WrapOptions(zap.Development(), zap.AddCaller()))
|
||||
return &l
|
||||
return logger.NewLoggerWrapper(
|
||||
zaptest.NewLogger(t,
|
||||
zaptest.Level(zapcore.DebugLevel),
|
||||
zaptest.WrapOptions(zap.Development(), zap.AddCaller()),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue