mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-13 19:56:38 +05:00
Update syslog init in cgr-engine for the new logger
This commit is contained in:
committed by
Dan Christian Bogos
parent
eb3130cecf
commit
dceba2e60d
@@ -355,11 +355,10 @@ func (cgr *CGREngine) Init(ctx *context.Context, shtDw context.CancelFunc, flags
|
||||
}
|
||||
|
||||
// init syslog
|
||||
if utils.Logger, err = utils.Newlogger(utils.FirstNonEmpty(*flags.SysLogger,
|
||||
cgr.cfg.GeneralCfg().Logger), cgr.cfg.GeneralCfg().NodeID); err != nil {
|
||||
if utils.Logger, err = utils.NewLogger(utils.FirstNonEmpty(*flags.SysLogger, cgr.cfg.GeneralCfg().Logger),
|
||||
cgr.cfg.GeneralCfg().NodeID, cgr.cfg.GeneralCfg().LogLevel); err != nil {
|
||||
return fmt.Errorf("Could not initialize syslog connection, err: <%s>", err)
|
||||
}
|
||||
utils.Logger.SetLogLevel(cgr.cfg.GeneralCfg().LogLevel)
|
||||
utils.Logger.Info(fmt.Sprintf("<CoreS> starting version <%s><%s>", vers, runtime.Version()))
|
||||
cgr.cfg.LazySanityCheck()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user