On Thu, 8 Jul 2010 17:59:23 +0530
Kaushal Shriyan <kaushalshri...@gmail.com> wrote:
On Thu, Jul 8, 2010 at 5:48 PM, Jacob Kjome <h...@visi.com> wrote:
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
Thanks Jake.
Thanks, I could see it on catalina.out file where in system.out and
system.err files goes.
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.
Please help me understand by providing examples.
Basically if i set log4j.appender.R.DatePattern='.'yyyy-MM-dd in
log4j.properties It rolls over at midnight. is there a way to roll
over at say 12:00 Noon afternoon
Oh, I see. Sorry, I thought you were asking if you could delay instantiation
of your appender. Rather, you want to define when it rolls. See:
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html
As you can see, DailyRollingFileAppender is somewhat lacking in flexibility.
You may have more luck with the Log4j-extras companion [1]. Specifically,
RollingFileAppender [2] with a TimeBasedRollingPolicy [3].
[1] http://logging.apache.org/log4j/companions/extras/index.html
[2]
http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/RollingFileAppender.html
[3]
http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html
Jake
Please suggest/guide further
Thanks, 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