I can direct all messages to log.txt file:
logFile, err := os.OpenFile(\"log.txt\", os.O_CREATE | os.O_APPEND | os.O_RDWR, 0666) if err != nil { panic(er
Use an io.MultiWriter
MultiWriter creates a writer that duplicates its writes to all the provided writers, similar to the Unix tee(1) command
mw := io.MultiWriter(os.Stdout, logFile) log.SetOutput(mw)