Use correct log level global variable

This commit is contained in:
Saxon Nelson-Milton 2023-09-17 23:16:30 +00:00
parent 16df4ed2aa
commit db84c5bfcf
1 changed files with 2 additions and 3 deletions

View File

@ -65,7 +65,6 @@ const (
logMaxSize = 500 // MB logMaxSize = 500 // MB
logMaxBackup = 10 logMaxBackup = 10
logMaxAge = 28 // days logMaxAge = 28 // days
logVerbosity = logging.Info
logSuppress = true logSuppress = true
) )
@ -456,7 +455,7 @@ func (m *broadcastManager) createOrUpdate(broadcast Broadcast) error {
signalCh := make(chan struct{}) signalCh := make(chan struct{})
m.slateExitSignals[broadcast.mac] = signalCh m.slateExitSignals[broadcast.mac] = signalCh
err := writeSlateAndCheckErrors(broadcast.rv, signalCh, m.log) err := writeSlateAndCheckErrors(maybeOld.rv, signalCh, m.log)
if err != nil { if err != nil {
return err return err
} }
@ -512,7 +511,7 @@ func main() {
// Create logger that we call methods on to log, which in turn writes to the // Create logger that we call methods on to log, which in turn writes to the
// lumberjack and netloggers. // lumberjack and netloggers.
log := logging.New(logVerbosity, io.MultiWriter(fileLog), logSuppress) log := logging.New(loggingLevel, io.MultiWriter(fileLog), logSuppress)
global.SetLogger(log) global.SetLogger(log)