From 410722bc13b3a7fd65cffce11a53f5d1a5c5575b Mon Sep 17 00:00:00 2001 From: nxshock Date: Sat, 14 May 2022 14:16:49 +0500 Subject: [PATCH] Write main log to stderr too For debug purpose --- main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 9832fc5..1cadfd4 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "io" "os" "os/signal" "path/filepath" @@ -34,9 +35,10 @@ func init() { HideKeys: true, NoColors: true, TrimMessages: true}) - //multiWriter := io.MultiWriter(os.Stderr, logFile) - //log.SetOutput(multiWriter) - log.SetOutput(mainLogFile) + + multiWriter := io.MultiWriter(os.Stderr, mainLogFile) + log.SetOutput(multiWriter) + log.SetLevel(log.InfoLevel) initTemplate()