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
|
@ -75,9 +75,9 @@ func (c *Controller) acquireReport(epoch uint64) *reportContext {
|
|||
|
||||
c.mtx.Unlock()
|
||||
|
||||
log := c.opts.log.With(
|
||||
log := &logger.Logger{Logger: c.opts.log.With(
|
||||
zap.Uint64("epoch", epoch),
|
||||
)
|
||||
)}
|
||||
|
||||
if ctx == nil {
|
||||
log.Debug("report is already started")
|
||||
|
@ -191,6 +191,6 @@ func (p *StopPrm) SetEpoch(e uint64) {
|
|||
func (c *Controller) Stop(prm StopPrm) {
|
||||
c.freeReport(
|
||||
prm.epoch,
|
||||
c.opts.log.With(zap.Uint64("epoch", prm.epoch)),
|
||||
&logger.Logger{Logger: c.opts.log.With(zap.Uint64("epoch", prm.epoch))},
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue