[#1366] node, ir: Support timestamp config option, update tests

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
Aleksey Savchuk 2024-09-16 10:46:26 +03:00
parent ea48e928c8
commit d4bec24c9f
No known key found for this signature in database
11 changed files with 24 additions and 1 deletions

View file

@ -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
}