Yes it's Linux. Thanks for the information.
Regards, Sumit > On 03-Mar-2014, at 4:55 pm, David Roussel <[email protected]> wrote: > > Is this on Unix? On windows you wouldn't be able to delete the file. > > 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. > > Just try to not delete it. > > David > >> On 3 Mar 2014, at 10:41, Sumit Bhardwaj <[email protected]> wrote: >> >> Hi, >> >> 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. >> >> is there anything I am missing?? Or is this the expected behaviour? >> >> I have pasted my configuration below. >> >> Regards, >> Sumit >> >> <configuration scan="true"> >> >> <contextName>MY_APP</contextName> >> >> >> >> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> >> >> <!-- encoders are assigned the type >> >> ch.qos.logback.classic.encoder.PatternLayoutEncoder >> by default --> >> >> <encoder> >> >> <pattern>%d{yyyy-MM-dd HH:mm:ss} %contextName >> %logger [%5level] %msg%n</pattern> >> >> </encoder> >> >> <filter></filter> >> >> </appender> >> >> >> >> <!-- Size and time based archiving --> >> >> <appender name="FILE" >> class="ch.qos.logback.core.rolling.RollingFileAppender"> >> >> <file>${MY_HOME}/logs/logfile.log</file> >> >> <triggeringPolicy >> class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> >> >> <maxFileSize>5MB</maxFileSize> >> >> </triggeringPolicy> >> >> >> >> <rollingPolicy >> class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> >> >> >> <fileNamePattern>${MY_HOME}/logs/logfile-%i.log</fileNamePattern> >> >> <minIndex>1</minIndex> >> >> <maxIndex>3</maxIndex> >> >> </rollingPolicy> >> >> >> >> <encoder> >> >> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] >> %logger %5level - %msg%n</pattern> >> >> </encoder> >> >> </appender> >> >> >> >> <logger name="org.springframework" level="WARN" additivity="false"> >> >> <appender-ref ref="FILE"/> >> >> </logger> >> >> >> >> <!-- For all other loggers in the system, output to console --> >> >> <root level="WARN"> >> >> <appender-ref ref="STDOUT" /> >> >> </root> >> >> </configuration> >> >> _______________________________________________ >> 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
_______________________________________________ Logback-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-user
