<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Yes it's Linux.</div><div><br></div><div>Thanks for the information.</div><div><br></div><div>Regards,</div><div>Sumit</div><div><br>On 03-Mar-2014, at 4:55 pm, David Roussel <<a href="mailto:nabble@diroussel.xsmail.com">nabble@diroussel.xsmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Is this on Unix? On windows you wouldn't be able to delete the file. </div><div><br></div><div>On unix if you delete a file and another process is writing to it, then the file still exists until it is closed. So logback does not know the file has been deleted. </div><div><br></div><div>Just try to not delete it. <br><br>David</div><div><br>On 3 Mar 2014, at 10:41, Sumit Bhardwaj <<a href="mailto:sumit.bhardwaj@gmail.com">sumit.bhardwaj@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi,<div><br></div><div>We are using logback version 0.9.29, and if the log file is accidently deleted then logback stops logging and it needs app server restart to resume logging.</div><div><br></div><div>is there anything I am missing?? Or is this the expected behaviour?</div>
<div><br></div><div>I have pasted my configuration below.</div><div><br></div><div>Regards,</div><div>Sumit</div><div><br></div><div>
<p class=""><configuration scan="true"></p>
<p class=""> <contextName>MY_APP</contextName></p>
<p class=""><br></p>
<p class=""> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"></p>
<p class=""> <!-- encoders are assigned the type</p>
<p class=""> ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --></p>
<p class=""> <encoder></p>
<p class=""> <pattern>%d{yyyy-MM-dd HH:mm:ss} %contextName %logger [%5level] %msg%n</pattern></p>
<p class=""> </encoder></p>
<p class=""> <filter></filter></p>
<p class=""> </appender></p>
<p class=""><br></p>
<p class=""> <!-- Size and time based archiving --></p>
<p class=""> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"></p>
<p class=""> <file>${MY_HOME}/logs/logfile.log</file></p>
<p class=""> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"></p>
<p class=""> <maxFileSize>5MB</maxFileSize></p>
<p class=""> </triggeringPolicy></p>
<p class=""><br></p>
<p class=""> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"></p>
<p class=""> <fileNamePattern>${MY_HOME}/logs/logfile-%i.log</fileNamePattern></p>
<p class=""> <minIndex>1</minIndex></p>
<p class=""> <maxIndex>3</maxIndex></p>
<p class=""> </rollingPolicy></p>
<p class=""><br></p>
<p class=""> <encoder></p>
<p class=""> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger %5level - %msg%n</pattern></p>
<p class=""> </encoder></p>
<p class=""> </appender></p>
<p class=""><br></p>
<p class=""> <logger name="org.springframework" level="WARN" additivity="false"></p>
<p class=""> <appender-ref ref="FILE"/></p>
<p class=""> </logger></p>
<p class=""><br></p>
<p class=""> <!-- For all other loggers in the system, output to console --></p>
<p class=""> <root level="WARN"></p>
<p class=""> <appender-ref ref="STDOUT" /></p>
<p class=""> </root></p>
<p class=""></configuration></p></div>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Logback-user mailing list</span><br><span><a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a></span><br><span><a href="http://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a></span></div></blockquote></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Logback-user mailing list</span><br><span><a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a></span><br><span><a href="http://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a></span></div></blockquote></body></html>