logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From orko <orko_...@yahoo.com>
Subject Re: changing logger log levels while application is running
Date Wed, 12 Dec 2007 22:26:54 GMT
There is a method called setLevel in Category. You may want to getLevel of the logger and then
set it up to a new log level.


David Killeffer <rayden7@gmail.com> wrote: I'm trying to write a servlet that will let
me change the log level (and
thereby optionally turn the logger on/off) of a logger that is running in my
application code somewhere else.  Currently I have logging running in my
application fine, and I have been able to get information on the logger and
appenders that are running, but changing the level of the logger doesn't
stop the application code from continuing to log.

Is it possible to change the log level of a logger in memory
(programmatically) by way of a servlet that would then change logging for my
application code?

- David


Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message