How to log to a file?
2i2i opened this issue · 1 comments
2i2i commented
Is there a config or does code need changing to log events to a file for debugging?
2i2i commented
the following works as a simple solution:
in logger.go, change func init() to:
func init() {
zerolog.SetGlobalLevel(zerolog.DebugLevel)
// output := zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}
file, _ := ioutil.TempFile("./logs","a")
log = zerolog.New(file).With().Timestamp().Logger()
SetLevel(DebugLevel)
}