File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Reconfigure SLF4J during runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Reconfigure SLF4J during runtime" Watch "Reconfigure SLF4J during runtime" New topic

Reconfigure SLF4J during runtime

Per Lindberg
Ranch Hand

Joined: Jan 17, 2008
Posts: 48
It would be useful to be able to re-configure logging in a web app during runtime, without restarting, re-depoying or re-initialization.

It appears that you can change this in log4j simply by:

However, I also run slf4j on top of log4j, and this has no effect. I guess that slf4j doesn't get notified of the change.
Has anyone tried this? Is there a way to do this in slf4j, or to tell slf4j to re-load the settings from log4j?

I agree. Here's the link:
subject: Reconfigure SLF4J during runtime
It's not a secret anymore!