Rolling logs every 15 mins with logback 04 Aug 2015
Want to create rolling logs every 15 mins with logback ?
Idea was adapted from Andreas Kruthoff post, original post
#Create a new appender
This is a fifteen minutes appender but it is easy to modify … You have to understand that the appender is called only when something is logged. So if nothing is logged for 10 minutes your appender will not be called for 10 minutes.
Usually on real projects this is not an issue as a tons of logs are generated every minute…
So the idea is just to call the rollover method only when a period of 15min has been reached.
#Setup logback
Use your new appender in your logback configuration file.