mirror of https://bitbucket.org/ausocean/av.git
cmd/revid-cli: send logs using smartlogger
This commit is contained in:
parent
82e2df5d88
commit
39d0fa12d0
|
@ -72,7 +72,10 @@ const (
|
||||||
var canProfile = true
|
var canProfile = true
|
||||||
|
|
||||||
// The logger that will be used throughout.
|
// The logger that will be used throughout.
|
||||||
var log *logger.Logger
|
var (
|
||||||
|
smartLog *smartlogger.Smartlogger
|
||||||
|
log *logger.Logger
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
metaPreambleKey = "copyright"
|
metaPreambleKey = "copyright"
|
||||||
|
@ -160,7 +163,8 @@ func handleFlags() config.Config {
|
||||||
cfg.LogLevel = defaultLogVerbosity
|
cfg.LogLevel = defaultLogVerbosity
|
||||||
}
|
}
|
||||||
|
|
||||||
log = logger.New(cfg.LogLevel, &smartlogger.New(*logPathPtr).LogRoller, true)
|
smartLog = smartlogger.New(*logPathPtr)
|
||||||
|
log = logger.New(cfg.LogLevel, &smartLog.LogRoller, true)
|
||||||
|
|
||||||
cfg.Logger = log
|
cfg.Logger = log
|
||||||
|
|
||||||
|
@ -351,6 +355,8 @@ func run(cfg config.Config) {
|
||||||
ns.SetMode(paused, &vs)
|
ns.SetMode(paused, &vs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
smartLog.SendLogs(ns)
|
||||||
|
|
||||||
sleep:
|
sleep:
|
||||||
sleepTime, err := strconv.Atoi(ns.Param("mp"))
|
sleepTime, err := strconv.Atoi(ns.Param("mp"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue