<div dir="ltr">Hi,<br><div class="gmail_quote"><div dir="ltr"><div><br></div><div>In logback.xml, I am trying to use "AsyncAppender" as below. But I see empty system.log file.</div><div>When I directly use "RollingFileAppender" I see log entries in system.log file.</div>
<div><br></div><div><br></div><div>-------------</div><div> <appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender" queueSize="512"></div><div> <discardingThreshold>0</discardingThreshold> </div>
<div> <appender-ref ref="LOGFILE" /></div><div> </appender></div><div><br></div><div><br></div><div> <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"></div>
<div> <file>${data.dir:-..}/logs/system.log</file></div><div> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"></div><div> <!-- rollover daily --></div>
<div> <fileNamePattern>${data.dir:-..}/logs/system-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern></div><div> <!-- keep max of 10 days --></div><div> <maxHistory>10</maxHistory></div>
<div> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"></div><div> <!-- or whenever the file size reaches 50MB --></div><div>
<maxFileSize>50MB</maxFileSize></div><div> </timeBasedFileNamingAndTriggeringPolicy></div><div> </rollingPolicy></div><div> <encoder></div><div> <pattern>%d org:%X{orgName} env:%X{envName} %thread %-5level %logger{25} - %C{0}.%M\(\) : %msg%n</pattern></div>
<div> </encoder></div><div> </appender></div><div><br></div><div><br></div><div> <root level="${log.level:-DEBUG}"></div><div> </div><div> <appender-ref ref="ASYNC"/></div>
<div> <!--appender-ref ref="LOGFILE"/--></div><div> </div><div> </root></div><div>------------------------------------</div><div><br></div><div>Why is ASyncAppender not flushing log evenst to log file used by RollingFileAppender? I am using "logback v 1.1.2".</div>
<div><br></div><div>Thanks,</div><div>Hemana</div><div><br></div>
</div>
</div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Thanks,<div>Hemana</div><div>+918147706075</div><div>skype: hemana.gouda</div><div><br></div></div>
</div>