mirror of
https://github.com/nxshock/gron.git
synced 2025-07-01 00:13:36 +05:00
Write main log to stderr too
For debug purpose
This commit is contained in:
parent
a1ed8d73a0
commit
410722bc13
1 changed files with 5 additions and 3 deletions
8
main.go
8
main.go
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue