Friday, July 15, 2011

Updating Logging Level in Runtime using Spring

As you know, there is one way to achieve this easily by writing Java code, catch the logger and update the logging level. This is what I called: Programmatically!

But there is another way, when you already have Log4J in your WebApp, just like this:
Just add one additional param to your web.xml, besides log4jConfigLocation By doing this, the Listener will refresh the Log4J configuration each 2 seconds.

No comments:

Post a Comment