views:

795

answers:

2

It seems a Log4j rolling appender stopped logging because it hit the MaxBackupIndex limit. I've moved the old log files out of the way but Log4j doesn't seem to start logging again.

Is there a way to restart Log4J logging via JMX?

I'd like to leverage this insteaed of restarting a Tomcat instance.

Thanks.

+1  A: 

I don't think that's what log4j does. The MaxBackupIndex parameter tlle it how many old files to keep around before it starts deleting them, it has no effect on the logging itself. I suspect your problem lies elsewhere.

skaffman
You're right. According to the Log4J docs the MaxBackupIndex should not cause the RollingFileAppender to stop logging. It will just start deleting older files.
digitalsanctum
+1  A: 

Logback, log4j's successor can be reloaded via JMX. It also supports (in thread) automatic reloading of the configuration file if it is modified.

Ceki