How about using something a bit more dynamic and fully developed...

http://openutils.sourceforge.net/openutils-log4j/servlet.html


Jake

On 2/17/2010 7:19 AM, Per Lindberg wrote:
Per Lindberg wrote:

That's reassuring! Now all I have to do is to figure out why
I can't get it to work as it should. :-)

...and now I finally got it working. I had a trivial bug.
Thanks again for the reassurement, that helped me look
in the right place.

In case anyone is interested, here's what you can do:

String loggerClassPath = request.getParameter("logger-class-path");
String loggerLevel = request.getParameter("logger-level");
org.apache.log4j.Logger.getLogger(loggerClassPath)
.setLevel(org.apache.log4j.Level.toLevel(loggerLevel));

Works like a charm, even when logging calls then are to slf4j.

Cheers,
Per Lindberg

_______________________________________________
slf4j-user mailing list
slf4j-user@qos.ch
http://qos.ch/mailman/listinfo/slf4j-user



_______________________________________________
slf4j-user mailing list
slf4j-user@qos.ch
http://qos.ch/mailman/listinfo/slf4j-user

Reply via email to