Sorin Penteleiciuc
Sorin Penteleiciuc

Reputation: 865

Reason behind limitation of Logback is creating only 22 log files with FixedWindowRollingPolicy

I would like to understand the logic and reason behind: Logback is creating only 22 log files even if the max index is 300

I checked the source code :

https://github.com/qos-ch/logback/blob/master/logback-core/src/main/java/ch/qos/logback/core/rolling/FixedWindowRollingPolicy.java

/**
 * It's almost always a bad idea to have a large window size, say over 20.
 */
private static int MAX_WINDOW_SIZE = 20;

I would like to understand the risk of having a larger window size hence the hardware of my machines is really low.

I was also thinking of extending this behavior. My goal is to have a fixed size log file (like 30Mb) wih a pattern like log_year_month_day_minute_hour_second.zip

Why is it almost a bad idea to have a large window size ?

Is it bad when manipulating their names ? Does the size count ?

Upvotes: 1

Views: 92

Answers (0)

Related Questions