Browsed by
Category: Log4J

Redirect System.out.println() to Log4J

Redirect System.out.println() to Log4J

A couple of days ago I was struggling with a 3rd party API. Didn’t have access to the source code and the library was dumping out debug messages to the console via System.out.println(). I prefer Log4J and I was having a hard time figuring out which message from my logs corresponded to messages from the 3rd party API. Anyway, I ended up writing a small Java class to redirect all SOP output to my Log4J setup. Works like a charm…

Read More Read More