[logback-user] deleting the log file stops logging

Sumit Bhardwaj sumit.bhardwaj at gmail.com
Mon Mar 3 11:41:34 CET 2014


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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20140303/0d252f20/attachment.html>


More information about the Logback-user mailing list