1
0
mirror of https://github.com/nxshock/gron.git synced 2024-11-27 03:41:00 +05:00

Write main log to stderr too

For debug purpose
This commit is contained in:
nxshock 2022-05-14 14:16:49 +05:00
parent a1ed8d73a0
commit 410722bc13

View File

@ -1,6 +1,7 @@
package main package main
import ( import (
"io"
"os" "os"
"os/signal" "os/signal"
"path/filepath" "path/filepath"
@ -34,9 +35,10 @@ func init() {
HideKeys: true, HideKeys: true,
NoColors: true, NoColors: true,
TrimMessages: true}) TrimMessages: true})
//multiWriter := io.MultiWriter(os.Stderr, logFile)
//log.SetOutput(multiWriter) multiWriter := io.MultiWriter(os.Stderr, mainLogFile)
log.SetOutput(mainLogFile) log.SetOutput(multiWriter)
log.SetLevel(log.InfoLevel) log.SetLevel(log.InfoLevel)
initTemplate() initTemplate()