mirror of https://bitbucket.org/ausocean/av.git
revid: fix logging control
Setting log level at end of Revid.setConfig. Revid variable Logging to logging.
This commit is contained in:
parent
cc467243ea
commit
2bfb4d6b95
|
@ -134,7 +134,6 @@ func New(c config.Config, ns *netsender.Sender) (*Revid, error) {
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("could not set config, failed with error: %w", err)
|
||||
}
|
||||
r.cfg.Logger.SetLevel(c.LogLevel)
|
||||
go r.handleErrors()
|
||||
return &r, nil
|
||||
}
|
||||
|
@ -247,6 +246,7 @@ func (r *Revid) setConfig(config config.Config) error {
|
|||
}
|
||||
r.cfg.Logger.Log(logger.Info, "config validated")
|
||||
r.cfg = config
|
||||
r.cfg.Logger.SetLevel(r.cfg.LogLevel)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -739,7 +739,7 @@ func (r *Revid) Update(vars map[string]string) error {
|
|||
break
|
||||
}
|
||||
r.cfg.BurstPeriod = uint(v)
|
||||
case "Logging":
|
||||
case "logging":
|
||||
switch value {
|
||||
case "Debug":
|
||||
r.cfg.LogLevel = logger.Debug
|
||||
|
|
Loading…
Reference in New Issue