Re: [logback-user] logback initialization "à la" Spring

Davide Baroncelli baroncelli at yahoo.com
Fri Sep 28 17:28:19 CEST 2007



Davide Baroncelli wrote:
> 
> P.s.: let me express my disagreement for logback and sl4j not supporting
> neither the FATAL logging level nor automatic reloading of config files.
> 

Ok, I developed a small Spring runnable component useful for auto-reloading
of logback configs. It may be configured in an application context like
this:

<bean id="logbackReconfigurer"
class="org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean">
        <property name="scheduledExecutorTasks">
            <list>
                <bean
class="org.springframework.scheduling.concurrent.ScheduledExecutorTask">
                    <property name="period" value="5000"/>
                    <property name="runnable">
                        <bean
class="it.stratosfera.commons.logback.LogbackConfigurationReloaderRunnable">
                            <property name="configResource"
value="/WEB-INF/carcon-logback.xml"/>
                        </bean>
                    </property>
                </bean>
            </list>
        </property>
    </bean>

should anyone be interested, I re-attach a package with the updated classes, 
http://www.nabble.com/file/p12942829/logback-auto-reloading.jar here .
-- 
View this message in context: http://www.nabble.com/logback-initialization-%22%C3%A0-la%22-Spring-tf4527977.html#a12942829
Sent from the Logback User mailing list archive at Nabble.com.




More information about the Logback-user mailing list