You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Craig St. Jean" <cr...@gmail.com> on 2009/04/21 14:55:12 UTC

Log4j log levels keep resetting

Hello,
I am deploying a web application to WebSphere (6.0.2.x), using log4j
1.2.13.  Most of my loggers (in log4j.properties) are set to INFO, and I
have a web "dashboard" for modifying log levels using:
Logger.getLogger("...").setLevel(Level.toLevel("..."))

I also update console appender thresholds by calling
getAppender(CONSOLE_APPENDER) on a logger that has all of the appenders on
it.

My problem though is for some reason the threshold on the appenders and the
level on the loggers reset themselves within a minute or two of changing
them, as if its losing its singleton instances and reloading
log4j.properties.  Any ideas on how to prevent them from resetting?

Thank you!

Re: Log4j log levels keep resetting

Posted by "Craig St. Jean" <cr...@gmail.com>.
... I just found the problem, AspectJ FTL.

Someone put something in our AspectJ file to reload the log4j properties
file every minute so the file could be changed in production on the fly.
Not sure why they put it there considering we have an admin screen for that.

On Tue, Apr 21, 2009 at 8:55 AM, Craig St. Jean <cr...@gmail.com>wrote:

> Hello,
> I am deploying a web application to WebSphere (6.0.2.x), using log4j
> 1.2.13.  Most of my loggers (in log4j.properties) are set to INFO, and I
> have a web "dashboard" for modifying log levels using:
> Logger.getLogger("...").setLevel(Level.toLevel("..."))
>
> I also update console appender thresholds by calling
> getAppender(CONSOLE_APPENDER) on a logger that has all of the appenders on
> it.
>
> My problem though is for some reason the threshold on the appenders and the
> level on the loggers reset themselves within a minute or two of changing
> them, as if its losing its singleton instances and reloading
> log4j.properties.  Any ideas on how to prevent them from resetting?
>
> Thank you!
>