The max index can not greater than 20, hardcode, 
in 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;






BR,
Mike(Yu, Chong-Chao)


 




------------------ ???????? ------------------
??????:&nbsp;"haobo liu"<[email protected]&gt;;
????????:&nbsp;2020??6??18??(??????) ????9:12
??????:&nbsp;"logback users list"<[email protected]&gt;;

????:&nbsp;Re: [logback-user] maxIndex issue



does '200KB' is effective? every file part size is '200KB'?


Joud Kassem <[email protected]&gt; ??2020??6??17?????? ????7:57??????

Hi all,

I have my rollingFileAppender configured as follows:


appender("myAppender", RollingFileAppender) {
&nbsp; &nbsp; &nbsp; &nbsp; file = "${logDir}/myApp.log"
&nbsp; &nbsp; &nbsp; &nbsp; encoder(PatternLayoutEncoder) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; charset = Charset.forName('UTF-8')
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pattern = log_pattern
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; rollingPolicy(FixedWindowRollingPolicy) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fileNamePattern = 
"${logDir}/myApp%i.log"
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minIndex = 1
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxIndex = 24
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; triggeringPolicy(SizeBasedTriggeringPolicy) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxFileSize = 
FileSize.valueOf("200KB") &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; }



I had first the&nbsp;maxIndex = 20, i modified it to 24 and I'm testing. As I 
see the number of logs are 21 and rotating while it should be 24! I tested it a 
lot and still the same issue. Anybody has this issue before or knows why this 
is happening?


Thanks in advance,
Joud

 _______________________________________________
 logback-user mailing list
 [email protected]
 http://mailman.qos.ch/mailman/listinfo/logback-user
_______________________________________________
logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to