allow to customize syslog prefix (#4356)

Co-authored-by: Кадышев Вячеслав <v.kadyshev@dssl.ru>
This commit is contained in:
Vyacheslav Kadyshev
2025-03-24 17:54:33 +03:00
committed by GitHub
parent 06f723496d
commit 1069e131b0
7 changed files with 16 additions and 7 deletions

View File

@@ -127,7 +127,7 @@ func New(args []string) (*Core, bool) {
done: make(chan struct{}),
}
tempLogger, _ := logger.New(logger.Warn, []logger.Destination{logger.DestinationStdout}, "")
tempLogger, _ := logger.New(logger.Warn, []logger.Destination{logger.DestinationStdout}, "", "")
p.conf, p.confPath, err = conf.Load(cli.Confpath, defaultConfPaths, tempLogger)
if err != nil {
@@ -229,6 +229,7 @@ func (p *Core) createResources(initial bool) error {
logger.Level(p.conf.LogLevel),
p.conf.LogDestinations,
p.conf.LogFile,
p.conf.SysLogPrefix,
)
if err != nil {
return err
@@ -649,7 +650,8 @@ func (p *Core) closeResources(newConf *conf.Conf, calledByAPI bool) {
closeLogger := newConf == nil ||
newConf.LogLevel != p.conf.LogLevel ||
!reflect.DeepEqual(newConf.LogDestinations, p.conf.LogDestinations) ||
newConf.LogFile != p.conf.LogFile
newConf.LogFile != p.conf.LogFile ||
newConf.SysLogPrefix != p.conf.SysLogPrefix
closeAuthManager := newConf == nil ||
newConf.AuthMethod != p.conf.AuthMethod ||