When -Dlog4j.debug=true is set, Log4j prints its configuration progress to
System.err. With this, you should be able to see which config file is being
picked up.
You can run your appender at a specified time by not placing log4j.properties
in the classpath. But then you'll have to manually configure it at some later
point.
Note that if you also place a log4j.jar with WEB-INF/lib and another Log4j
config file in WEB-INF/classes of your webapp, you will get a separate logger
repository from the server containing a different configuration. If you
remove your config file from WEB-INF/classes, you'll still have a separate
logger repository from the server but use the same config as the server.
Jake
On Thu, 8 Jul 2010 10:21:39 +0530
Kaushal Shriyan <kaushalshri...@gmail.com> wrote:
On Wed, Jul 7, 2010 at 8:28 PM, Jacob Kjome <h...@visi.com> wrote:
Where did you put log4j.properties? For Tomcat 5.5.xx, it should be in
CATALINA_HOME/common/classes.
Try adding the following to CATALINA_OPTS....
-Dlog4j.debug=true
Jake
Hi Jake
Thanks for the quick reply. 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/common/classes and
have added -Dlog4j.debug=true under CATALINA_OPTS variable.
where do i look for the debug logs.
Please suggest.
Thanks and Regards
Kaushal
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org