<div dir="ltr">Hi Ceki,<div><br></div><div>I can not figure out version of logback used by play application.</div><div><br></div><div>However, there are following jars of logback in my \.ivy2\cache\ch.qos.logback\logback-core\jars folder</div><div><br></div><div>logback-core-1.1.1<br></div><div>logback-core-1.1.3<br></div><div>logback-core-1.1.4<br></div><div><br></div><div>Regards,</div><div>Suraj</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 13, 2016 at 2:51 PM, Suraj Mundada <span dir="ltr"><<a href="mailto:surajmundada@gmail.com" target="_blank">surajmundada@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">Hi,</span><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">I have configured log appenders to separate logs based on functionality. It looks as below:</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Appender:</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><div style="margin:0px;padding:0px;border:1px solid rgb(187,187,187);word-wrap:break-word;background-color:rgb(250,250,250)"><code style="margin:0px;padding:0px;border:0px"><div style="margin:0px;padding:0px;border:0px"><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><div style="margin:0px;padding:0px;border:0px"> <appender name="MOBILE_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender"></div><div style="margin:0px;padding:0px;border:0px"> <file>${application.home}/logs/mobile.log</file></div><div style="margin:0px;padding:0px;border:0px"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"></div><div style="margin:0px;padding:0px;border:0px"> <!-- daily rollover with compression --></div><div style="margin:0px;padding:0px;border:0px"> <fileNamePattern>${application.home}/logs/mobile-log-%d{dd-MM-yyyy}.gz</fileNamePattern></div><div style="margin:0px;padding:0px;border:0px"> <!-- keep 1 week worth of history --></div><div style="margin:0px;padding:0px;border:0px"> <maxHistory>7</maxHistory></div><div style="margin:0px;padding:0px;border:0px"> </rollingPolicy></div><div style="margin:0px;padding:0px;border:0px"> <encoder></div><div style="margin:0px;padding:0px;border:0px"> <pattern>%date{dd-MM-yyyy HH:mm:ss} %message%n</pattern></div><div style="margin:0px;padding:0px;border:0px"> <!-- this quadruples logging throughput --></div><div style="margin:0px;padding:0px;border:0px"> <immediateFlush>false</immediateFlush></div><div style="margin:0px;padding:0px;border:0px"> </encoder></div><div style="margin:0px;padding:0px;border:0px"> </appender></div></span></div></code></div><br>Logger:</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><div style="margin:0px;padding:0px;border:1px solid rgb(187,187,187);word-wrap:break-word;background-color:rgb(250,250,250)"><code style="margin:0px;padding:0px;border:0px"><div style="margin:0px;padding:0px;border:0px"><div style="margin:0px;padding:0px;border:0px"> <logger name="mobile" level="DEBUG" additivity="false"></div><div style="margin:0px;padding:0px;border:0px"> <appender-ref ref="MOBILE_APPENDER" /></div><div style="margin:0px;padding:0px;border:0px"> </logger></div><div style="margin:0px;padding:0px;border:0px"><br></div></div></code></div><br>Code:</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><div style="margin:0px;padding:0px;border:1px solid rgb(187,187,187);word-wrap:break-word;background-color:rgb(250,250,250)"><code style="margin:0px;padding:0px;border:0px"><div style="margin:0px;padding:0px;border:0px"><font color="#660066" style="margin:0px;padding:0px;border:0px">Logger.of("mobile").debug("log statement");<br></font></div></code></div><br>Same configuration works well for other appenders and loggers for different log files. In the case of mobile log file, it gets split into multiple tmp files as below</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><div style="margin:0px;padding:0px;border:1px solid rgb(187,187,187);word-wrap:break-word;background-color:rgb(250,250,250)"><code style="margin:0px;padding:0px;border:0px"><div style="margin:0px;padding:0px;border:0px"><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">mobile</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">log1069573507939492</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">tmp<br>mobile</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">log1156778511668518</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">tmp<br>mobile</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">log1420697709142498</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">tmp<br>mobile</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">log1503633156746801</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">tmp<br>mobile</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">log1674487680335483</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">tmp<br>mobile</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">log1761638721293414</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">tmp<br>mobile</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">log1932597676801911</span><span style="margin:0px;padding:0px;border:0px;color:rgb(102,102,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">tmp</span></div></code></div><div style="margin:0px;padding:0px;border:0px"><br></div></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Because of this, it does not get compressed at every midnight as per log rolling policy.</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Any idea why it happens? </div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Regards,</div><div style="margin:0px;padding:0px;border:0px;font-family:Arial,Helvetica,sans-serif;font-size:13px">Suraj</div></div>
</blockquote></div><br></div>