I am using Undertow 2.0.16 to build our microservices. I am using log4j 2.11 as my logging framework with undertow. I started using one of the handler StuckThreadDetectionHandler to verify what kind of message is generated. I purposefully added a sleep of more than the threshold in the handler however no message was printed. Moreover I've noticed if I use anything other than debug mode then Undertow doesn't log any messages in stdout or logfile.
I am using Log4j JCL adapter.
Moreover also setting this configuration during the startup of service:
System.setProperty("org.jboss.logging.provider", "log4j2");
Also setting following configuration for undertow and xnio and nothing gets printed ever
<AsyncLogger name="org.xnio" level="info" additivity="false" includeLocation="true"> <appender-ref ref="async"/> </AsyncLogger> <AsyncLogger name="io.undertow" level="info" additivity="false" includeLocation="true"> <appender-ref ref="async"/> </AsyncLogger>