forked from TrueCloudLab/frostfs-node
[#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
|
@ -51,7 +51,7 @@ func defaultCfg(с *cfg) {
|
|||
},
|
||||
fullSizeLimit: 1 << 30, // 1GB
|
||||
objSizeLimit: 1 << 20, // 1MB
|
||||
log: zap.L(),
|
||||
log: &logger.Logger{Logger: zap.L()},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ func WithFullSizeLimit(lim uint64) Option {
|
|||
// WithLogger returns an option to specify Blobovnicza's logger.
|
||||
func WithLogger(l *logger.Logger) Option {
|
||||
return func(c *cfg) {
|
||||
c.log = l.With(zap.String("component", "Blobovnicza"))
|
||||
c.log = &logger.Logger{Logger: l.With(zap.String("component", "Blobovnicza"))}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue