log4j appender config
Is there a way to run log4j appender at a specified time?
log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/catalina.out
log4j.appender.R.DatePattern='.'yyyy-MM-dd
log4j.appender.R.layout=org.apache.log4j.PatternLayout
I have put the log4j.properties
under /opt/tomcat0/com开发者_开发问答mon/classes
If I understand correctly you want to enable / disable logging at runtime ?
If the above assumption is right - you can do the same via JMX.
精彩评论