Skip to content

Log4J2LoggingSystem.FILTER causes some exceptions to be lost from the log #5271

@shalom938

Description

@shalom938

Log4J2LoggingSystem.beforeInitialize installs a log4j2 filter that denies all, and removes the filter in initialize method.
if there is a multi profile yaml that contains a typo the application fails and the exception is not logged.
In this case its ConfigFileApplicationListener that fails while the filter is installed, if another listener will fail then its exception will be lost too.

to recreate run sample.actuator.log4j2.SampleActuatorLog4J2Application with this application.yml:


---
spring:
    profiles:
         active: local

---
spring:
    profiles: local
a=test

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions