20 Feb 2010 02:20
Re: Reconfigure during runtime
Jacob Kjome <hoju <at> visi.com>
2010-02-20 01:20:24 GMT
2010-02-20 01:20:24 GMT
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.(Continue reading)> > ...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
>
> ...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
RSS Feed