natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.76k stars 585 forks source link

How to test/show lumberjack log rotation in action? #150

Open yash97 opened 2 years ago

yash97 commented 2 years ago

As from the configuration, log size is int MB so it will take time to write 1mb of logs and max age is also 1 day. So how do I add lumberjack in my codebase and test that it is successfully rotating logs or demo it to other folks that it works.

natefinch commented 2 years ago

Write a meg of data, change your computer clock. (note: v3 will let you do fine-grained size and max age settings, to make that easier)