Monday, April 2, 2012

Java Logger losing it's handler

When you set a handler for a java.util.logging.Logger class, you must ensure you store that logger in a static object somewhere, otherwise the JVM can garbage collect it at any time. Because it can be garbage collected, one minute you might have perfectly formatted output, the next it'll go back to it's default.

No comments: