natefinch / lumberjack

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

preamble lines that prefix every new log file #41

Closed glycerine closed 7 years ago

glycerine commented 7 years ago

At program startup, I record the version info of the program to my log. It would be nice to declare these log lines as a part of a preamble that every new log file starts with. That way the critical version of code and the command-line and config arguments are preserved, even if it is a month later and the original log has long ago been rotated away.

glycerine commented 7 years ago

I forked and added the preamble described, as well as gzip and a separate rotation dir.