[#1770] logger: Refactor Logger
component
Make it store its internal `zap.Logger`'s level. Also, make all the components to accept internal `logger.Logger` instead of `zap.Logger`; it will simplify future refactor. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
4baf00aa21
commit
f037022a7a
83 changed files with 207 additions and 156 deletions
|
@ -42,13 +42,13 @@ const (
|
|||
)
|
||||
|
||||
func (exec *execCtx) setLogger(l *logger.Logger) {
|
||||
exec.log = l.With(
|
||||
exec.log = &logger.Logger{Logger: l.With(
|
||||
zap.String("request", "DELETE"),
|
||||
zap.Stringer("address", exec.address()),
|
||||
zap.Bool("local", exec.isLocal()),
|
||||
zap.Bool("with session", exec.prm.common.SessionToken() != nil),
|
||||
zap.Bool("with bearer", exec.prm.common.BearerToken() != nil),
|
||||
)
|
||||
)}
|
||||
}
|
||||
|
||||
func (exec execCtx) context() context.Context {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue