Is there a way in go language to log to multiple output in different levels?.
I want to have a program that logs to stdout in Info level and to a file in debug level with timestamp at the same time.
Like every time I code:
log.Debug("Entering some func")
res := func()
log.Infof("Result was: %s", res)
I can see the console prints:
Result was: Successful
And a file with:
2015-03-26T01:27:38-04:00 [DEBU]: Entering some func
2015-03-26T01:27:38-04:00 [INFO]: Result was: Successful
I use logrus and glog, but can't find this functionallity. Is there another package or something I can code?