forked from TrueCloudLab/frostfs-node
[#1366] node, ir: Support timestamp
config option, update tests
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
ea48e928c8
commit
d4bec24c9f
11 changed files with 24 additions and 1 deletions
|
@ -102,6 +102,7 @@ type applicationConfiguration struct {
|
|||
LoggerCfg struct {
|
||||
level string
|
||||
destination string
|
||||
timestamp bool
|
||||
}
|
||||
|
||||
EngineCfg struct {
|
||||
|
@ -220,6 +221,7 @@ func (a *applicationConfiguration) readConfig(c *config.Config) error {
|
|||
|
||||
a.LoggerCfg.level = loggerconfig.Level(c)
|
||||
a.LoggerCfg.destination = loggerconfig.Destination(c)
|
||||
a.LoggerCfg.timestamp = loggerconfig.Timestamp(c)
|
||||
|
||||
// Storage Engine
|
||||
|
||||
|
@ -1023,6 +1025,7 @@ func (c *cfg) loggerPrm() (*logger.Prm, error) {
|
|||
// not expected since validation should be performed before
|
||||
panic("incorrect log destination format: " + c.LoggerCfg.destination)
|
||||
}
|
||||
c.dynamicConfiguration.logger.PrependTimestamp = c.LoggerCfg.timestamp
|
||||
|
||||
return c.dynamicConfiguration.logger, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue