Remove context
This commit is contained in:
parent
61ec2c44a6
commit
8020b9c18f
1 changed files with 3 additions and 3 deletions
|
@ -11,8 +11,9 @@ import (
|
||||||
|
|
||||||
var once sync.Once
|
var once sync.Once
|
||||||
|
|
||||||
|
var log zerolog.Logger
|
||||||
|
|
||||||
func Get(c string, l string) zerolog.Logger {
|
func Get(c string, l string) zerolog.Logger {
|
||||||
var log zerolog.Logger
|
|
||||||
once.Do(func() {
|
once.Do(func() {
|
||||||
zerolog.TimeFieldFormat = time.RFC3339Nano
|
zerolog.TimeFieldFormat = time.RFC3339Nano
|
||||||
|
|
||||||
|
@ -25,10 +26,9 @@ func Get(c string, l string) zerolog.Logger {
|
||||||
panic("unable to get parse level for logger")
|
panic("unable to get parse level for logger")
|
||||||
}
|
}
|
||||||
|
|
||||||
log := zerolog.New(output).
|
log = zerolog.New(output).
|
||||||
Level(zerolog.Level(level)).
|
Level(zerolog.Level(level)).
|
||||||
With().
|
With().
|
||||||
Str("context", c).
|
|
||||||
Timestamp().
|
Timestamp().
|
||||||
Logger()
|
Logger()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue