Closed bbkane closed 1 year ago
Log uses os.Stderr
by default. You can change the default output using log.SetOutput()
or use New(io.Writer)
. If you want different output streams for different levels, you will have to use separate loggers.
I just wrote a small Uber/zap wrapper for this https://github.com/bbkane/logos
I plan to use log for longer running CLI apps and sometimes I want to do something like:
so I can just see the errors.
If this doesn't seem like a useful feature to you, no worries, I can always just use two loggers.