How do I redirect a 3rd partly log4j message to my own DailyRollingFileAppender?

93 views Asked by At

I'm getting messages like this on my console from XMPP library Babbler:

Jun 08, 2015 9:10:11 PM rocks.xmpp.extensions.caps.EntityCapabilitiesManager$7 run
WARNING: Failed to discover information for entity '[email protected]/User' for node 'http://...'

I would really like to redirect these messages to a DailyRollingFileAppender I already have for my own log4j logging, but I haven't figured out the correct log4j.xml incantation to make that happen. Does anyone have any suggestions other than "read the log4j docs?" I've been doing that and tinkering with settings, but nothing has helped so far.

1

There are 1 answers

0
gknauth On

It turns out Babbler was using java.util.logging. I upgraded my own logging from Log4J 1.2.17 to Log4J2 2.3, and then used the JUL bridge to capture and redirect the logging output from Babbler to Log4J2 RollingFile appender.