Issues with logback overrides in Nexus 3.80.0-06

Hello to all,

I am configuring logback for Nexus version 3.80.0-06 and have a few questions:

  1. I am using logback-overrides.xml located at /var/opt/sonatype-work/nexus3/etc/logback/logback-overrides.xml, as described in the official documentation (Logging Configuration).
    I want to move all log files to the /log filesystem without modifying the logback.xml file included in the application tarball.

    To do this:

    • I have set /var/opt/sonatype-work as the $data-dir set through ${keraf.data} inside nexus.vmoptions
    • I have created /var/opt/sonatype-work/nexus3/etc/logback/logback.xml as a copy of logback.xml with updated paths, and then restarted Nexus. However, the override file was completely ignored, and logs are still being written to /var/opt/sonatype-work/nexus3/log/.

    I have already:

    • Verified that no errors are raised for logback in nexus.log (A line reports this detail: INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.internal.log.overrides.file.LogbackLoggerOverrides - File: /var/opt/sonatype-work/nexus3/etc/logback/logback-overrides.xml)
    • Verified that logback-overrides.xml exists in the correct location
    • Removed all unchanged sections from logback-overrides.xml compared to logback.xml (I have left only the configuration and appender blocks)
    • Tried running Nexus with the option -Dlogback.configurationFile=/var/opt/sonatype-work/nexus3/etc/logback/logback-overrides.xml added to nexus.vmoptions, but received a NullPointerException indicating that NullPointerException: Name is not defined

    Am I currently missing something?

  2. Is the file $install-dir/etc/logback/logback-access.xml used by Nexus? It is shipped with the tarball, but not documented, and modifying it does not seem to have any effect.

  3. In logback.xml, there is a line referencing another XML file that is not documented: <include file="${karaf.data}/etc/logback/logback-tasklogfile-appender-override.xml" optional="true"/>

    What is the purpose of this file?

Thank you in advance for your help!