Skip to content

Logback can no longer monitor not-yet-existing included files #1021

Closed

Description

@phearnot

As described in #928, Logback 1.5.18 used to be able to watch not-yet-existing files, but as of version 1.5.27, this feature is no longer available. We used this feature in Waves Node to make it easier for the end users to configure logging without restarting the process. Waves Node version 1.5.11 includes Logback 1.5.18, which works fine, and the development build with Logback 1.5.27 no longer loads the newly created included file.

Here's how to reproduce it in our app. Suppose /tmp/conf is an empty directory where logback.xml would later be created. Run the container with Waves node:

docker run --rm -it -e WAVES_WALLET_PASSWORD=123 -v /tmp/conf:/etc/waves wavesplatform/wavesnode:1.5.11

Notice that stdout log level is set to INFO and keep the process running. Now create the included logback.xml:

cat <<EOF >/tmp/conf/logback.xml
<included>
  <property name="logback.stdout.level" value="TRACE"/>
</included>
EOF

Wait a few seconds and notice that TRACE messages begin to show up.

Check Logback version:

❯ docker run --rm --entrypoint bash wavesplatform/wavesnode:1.5.11  -c 'ls -1 /usr/share/waves/lib/*logback.logback*'
/usr/share/waves/lib/ch.qos.logback.logback-classic-1.5.18.jar
/usr/share/waves/lib/ch.qos.logback.logback-core-1.5.18.jar

When running the development build, Logback no longer reads the changes from the newly created file:

docker run --rm -it -e WAVES_WALLET_PASSWORD=123 -v /tmp/conf:/etc/waves ghcr.io/wavesplatform/waves:p256verify

Logback versions in the dev build:

❯ docker run --rm --entrypoint bash ghcr.io/wavesplatform/waves:p256verify  -c 'ls -1 /usr/share/waves/lib/*logback.logback*'
/usr/share/waves/lib/ch.qos.logback.logback-classic-1.5.27.jar
/usr/share/waves/lib/ch.qos.logback.logback-core-1.5.27.jar

Activity

  1. ceki commented on Feb 14, 2026

    @ceki
    Member

    @phearnot Issue fixed in release 1.5.30.

  2. pzygielo commented on Feb 14, 2026

    @pzygielo

    Hmmm. When I upgrade from 29 (so 29 works perfectly fine) to 30 (i.e. bumping from 29 to 30 is the sole change) this happens:

    Caused by: java.lang.IllegalStateException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.helpers.NOPLoggerFactory loaded from file:/home/runner/.m2/repository/org/slf4j/slf4j-api/2.0.17/slf4j-api-2.0.17.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml
    

    For me it seems related as this issue is the only one referenced in https://github.com/qos-ch/logback/releases/tag/v_1.5.30.

    I have just observed this, so have no extracted reproducer for my case.

  3. mmoayyed commented on Feb 14, 2026

    @mmoayyed

    I am also seeing this:

    Caused by: java.lang.IllegalStateException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. 
    Either remove Logback or the competing implementation (class org.slf4j.helpers.NOPLoggerFactory 
    loaded from file:/home/runner/.m2/repository/org/slf4j/slf4j-api/2.0.17/slf4j-api-2.0.17.jar). If you are using WebLogic you will need 
    to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml
    

    This is because logback-classic 1.5.30 is broken; it's missing the META-INF/services entries so the SPI can never be loaded. Comparing the outcome of the jar for 1.5.29 and 1.5.30 shows that the former has the entries while the latter (latest release) does not.

    Compare:

    with

  4. ceki commented on Feb 14, 2026

    @ceki
    Member

    @mmoayyed Thank you for catching this. Issue is fixed in version 1.5.31 released a few moments ago. Added a test case to catch this in the unlikely event that it occurs again.

  5. self-assigned this
    on Feb 14, 2026
  6. added this to the 1.5.31 milestone on Feb 14, 2026
  7. mmoayyed commented on Feb 14, 2026

    @mmoayyed

    Outstanding. Thank you for the quick fix.

  8. phearnot commented on Feb 16, 2026

    @phearnot
    Author

    I can confirm the fix is working, thanks for the prompt response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions