natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.8k stars 591 forks source link

Logging mutli-files #53

Closed LeaBloodForged closed 6 years ago

LeaBloodForged commented 6 years ago

Hi, I wanted to know if it was possible to write the logs to differents files. I would like to write the log.Error in one file and the log.Info in another file. Thanks in advance.

natefinch commented 6 years ago

this all depends on what logging library you use. lumberjack doesn't know or care what logger you're using. it just wraps a file. you could have two instances of lumberjack wrapping two different files... but getting info or error is at the log library level and you'll have to consult the docs for your particular library.