Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1014

ReconfigureOnChangeFilter doesn't work with scan=true in Tomcat/war deployment

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.1.2
    • logback-classic
    • None
    • Ubuntu, Tomcat 8.0.12, Tomcat 7.0.39

    Description

      Even though logback.xml gets correctly loaded on startup and scheduled for reloading, changes to the file don't get detected and configuration never gets refreshed.

      Steps to reproduce:

      1. download a clean Tomcat bundle (to make sure there are no interferences)
      2. clone https://github.com/kryger/logback-war-configuration-scan-repro
      3. build with mvn package
      4. copy the built demo-0.0.1-SNAPSHOT.war file to tomcat/webapps/
      5. start Tomcat up (tomcat/bin/startup.sh)
      6. watch tomcat/logs/catalina.out
      7. navigate to http://localhost:8080/demo/

      00:51:16,860 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at file:/home/kryger/Programy/apache/apache-tomcat-8.0.12/webapps/demo/WEB-INF/classes/logback.xml
      00:51:16,926 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeFilter scanning period to 2 seconds
      00:51:16,926 |-INFO in ReconfigureOnChangeFilter

      Unknown macro: {invocationCounter=0}

      - Will scan for changes in [[/home/kryger/Programy/apache/apache-tomcat-8.0.12/webapps/demo/WEB-INF/classes/logback.xml]] every 2 seconds.
      00:51:16,926 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
      (...)

      No matter how long I wait and how many log events happen (i.e. reloading the page) the /webapps/demo/WEB-INF/classes/logback.xml file doesn't get reloaded.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            kryger Lukasz Kryger
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: