mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-05 07:36:57 +08:00
allow to customize syslog prefix (#4356)
Co-authored-by: Кадышев Вячеслав <v.kadyshev@dssl.ru>
This commit is contained in:

committed by
GitHub

parent
06f723496d
commit
1069e131b0
@@ -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 ||
|
||||
|
Reference in New Issue
Block a user