(Zap log framework, Go) Initialize log once and reuse from other Go file (Solved)
问题 I'm trying to migrate my application from the beautiful Logrus (very helpful for debug) and introducing the Uber log framework Zap. With Logrus, i can initialize the logger only once and reuse it from other Go file, an example: package main import( // Print filename on log filename "github.com/onrik/logrus/filename" // Very nice log library log "github.com/sirupsen/logrus" ) func main(){ // ==== SET LOGGING Formatter := new(log.TextFormatter) Formatter.TimestampFormat = "Jan _2 15:04:05