Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top