Skip to content

ConsoleAppender ignored in logback-access.xmlΒ #994

@gomil

Description

@gomil

While upgrading logback-core from 1.5.22 to 1.5.23, we encountered errors related to our configuration in logback-access.xml.

INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Could NOT find configuration file [/private/var/folders/p0/fgdty5yn6d3glgfn0qxv9cm80000gq/T/tomcat.8080.14039878947770433632/logback-access.xml] using property "catalina.base"
INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Could NOT find configuration file [/private/var/folders/p0/fgdty5yn6d3glgfn0qxv9cm80000gq/T/tomcat.8080.14039878947770433632/logback-access.xml] using property "catalina.home"
INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Found [logback-access.xml] as a resource.
WARN in ch.qos.logback.core.model.processor.AppenderModelHandler - Appender named [logstash] not referenced. Skipping further processing.
ERROR in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Failed to find appender named [logstash]
INFO in ch.qos.logback.core.model.processor.DefaultProcessor@71fb8301 - End of configuration.
INFO in ch.qos.logback.access.common.joran.JoranConfigurator@7cdfa824 - Registering current configuration as safe fallback point
INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Done configuring

It appears that the configured ConsoleAppender is no longer recognized. After reviewing the release notes, we identified this commit as the likely cause. The logic for binding loggers to appenders seems to have moved from a global location to a more specific one (FileAppender), resulting in the ConsoleAppender no longer being picked up.

This is our logback-access.xml

<configuration debug="true">

  <appender name="logstash" class="ch.qos.logback.core.ConsoleAppender"/>

  <appender-ref ref="logstash"/>

</configuration>

The non-accesslog configuration for ConsoleAppender still appears to work.

Environment

  • spring-boot:3.5.9
  • amazoncorretto:21.0.9

If you need any further information to reproduce the issue, please let me know.

Best regards, Andy

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions