<div dir="ltr"><div style> Hi I have an RollingFileAppender with a triggering policy of rotating by size when the log reaches 32MB and a maxIndex of 1, configuration below.</div><div style>It happens that after rotation logback keeps writing to both files. Is this expected? My understanding from documentation is that it will stop writing to the current log, rename it and starts writing a to a new file with the name of the File parameter.</div>
<div style><br></div><div style>I'd appreciate your clarification if I'm not understanding well the RollingFileAppender and SizeBasedTriggering behavior.</div><div style><br></div><div style>Thanks,</div><div style>
Rolando</div><div style><br></div><div style><br></div><div style><br></div><div><appender name="lognocrlf" class="ch.qos.logback.core.rolling.RollingFileAppender"></div><div>    <File>/opt/log/file.nocrlf.log</File></div>
<div>    <encoder></div><div>      <pattern>[%d{ISO8601}] %5p [%t] \(%logger\) - %replace(%m){'\r?\n',''}%n</pattern></div><div>    </encoder></div><div>    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"></div>
<div>      <maxIndex>1</maxIndex></div><div>      <FileNamePattern>/opt/log/file.nocrlf.log.%i</FileNamePattern></div><div>    </rollingPolicy></div><div>    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"></div>
<div>      <MaxFileSize>32MB</MaxFileSize></div><div>    </triggeringPolicy></div><div>  </appender></div><div><br></div></div>