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