[undertow-dev] Undertow jboss logging redirect to logback log file and console

Steve Hu stevehu at gmail.com
Mon Feb 6 18:08:46 EST 2017


Hi,

Undertow is using jboss logger to log errors and my application is using
slf4j/logback with logback.xml config file in the classpath with Undertow
core http server embedded. I handles most exceptions in my own handlers but
sometimes uncaught exceptions reaches Connectors class - executeRootHandler
method which logs the error and return 500 response code.

My first question: Is there a way to redirect the logs from Undertow to
logback logs and controlled by logback.xml? I've found some discussions
about replacing logger in WildFly but I am using embedded Undertow core
only.

Second question: When Connectors.executeRootHandler will be called? Is it
called when you have the following line in your handler?

if (exchange.isInIoThread()) {
     exchange.dispatch(this);
     return;

}

Is there any way we can by pass this so that I can handle uncaught
exceptions in my ExceptionHandler in the handler chain?

Thanks,

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20170206/4de17643/attachment-0001.html 


More information about the undertow-dev mailing list