I would like to log anything related to Spring security (4.2.16) with Log4j.
It is an EAR file deployed in Wildfly 10.1.0 with the log4j.xml deployed into WEB-INF/classes of a WAR file included in the EAR
log4.xml has the following category:
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="debug" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{HH:mm:ss} %p [%t]:%c{3}.%M()%L - %m%n" />
</layout>
</appender>
<category name="org.springframework.security" additivity="false">
<priority value="TRACE" />
<appender-ref ref="STDOUT"/>
</category>
Logs are printed for any of the project classes, but the Log4j configuration is not working for spring security.
After debugging, logger.isDebugEnabled() returns false in the AffirmativeBased class
How to get the logs for anything related to spring security?