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
|
||||
|
||||
// The logger that will be used throughout.
|
||||
var log *logger.Logger
|
||||
var (
|
||||
smartLog *smartlogger.Smartlogger
|
||||
log *logger.Logger
|
||||
)
|
||||
|
||||
const (
|
||||
metaPreambleKey = "copyright"
|
||||
|
@ -160,7 +163,8 @@ func handleFlags() config.Config {
|
|||
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
|
||||
|
||||
|
@ -351,6 +355,8 @@ func run(cfg config.Config) {
|
|||
ns.SetMode(paused, &vs)
|
||||
}
|
||||
|
||||
smartLog.SendLogs(ns)
|
||||
|
||||
sleep:
|
||||
sleepTime, err := strconv.Atoi(ns.Param("mp"))
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue