[logback-user] logback config scan doesn't detect changes in included files

Richard Sand rsand at idfoundry.com
Sun May 5 19:25:58 CEST 2013


Hi all – I’m wondering if this is expected behavior. I’ve a web application
war file with a minimal logback.xml file in its WEB-INF/classes folder,
which then uses a JNDI env variable to pull in a config file that is
external to the application. This greatly facilitates deployment because I
can override the env variable when I deploy the war (e.g. in Tomcat, a
context.xml file) and specify the external location of the file, allowing
me to deploy the war unchanged on different platforms and environments.



But… I was hoping that having “scan=true” in the logback.xml file would
allow me to alter the runtime logback configuration without restarting the
context, but it doesn’t seem to be working.



My logback.xml file:



<configuration scan="true">

  <insertFromJNDI env-entry-name="java:comp/env/appHome" as="appHome" />

  <include file="${appHome}/conf/logback-app.xml"/>

  <contextListener
class="ch.qos.logback.classic.jul.LevelChangePropagator"/>

</configuration>



Is this a bug or a known/accepted limitation of using scan=true?



Thanks!



Richard Sand | Managing Director
PO Box 91824 | Austin | Texas 78709-1824 | USA
Office: +1 888 612 8820 ext 02 | Fax: +1 866 304 3754
Mobile: +1 267 984 3651

[image: logo - small]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130505/33fb4c69/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 3123 bytes
Desc: not available
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130505/33fb4c69/attachment.jpg>


More information about the Logback-user mailing list