You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by prashant_4s <pr...@four-soft.com> on 2009/02/23 10:10:25 UTC
Problem with DailyRollingFileAppender
I am having problem configuring daily logs in log4j.
Once the date is changed on my machine, the existing log file name changes
to current date and a new log file is created with all the previous log file
contents appended repetitively.
I have attached the log files and properties file.
http://www.nabble.com/file/p22157763/log4j.properties log4j.properties
http://www.nabble.com/file/p22157763/Cpu_Usage.log.2009-02-23
Cpu_Usage.log.2009-02-23
http://www.nabble.com/file/p22157763/Cpu_Usage.log Cpu_Usage.log
Can someone help me on this?
Thanks & Regards,
Prashant
--
View this message in context: http://www.nabble.com/Problem-with-DailyRollingFileAppender-tp22157763p22157763.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Problem with DailyRollingFileAppender
Posted by prashant_4s <pr...@four-soft.com>.
I am not using any struts framework. This is a simple web application. Also,
please check the timestamps of the each log entry within the file. At the
same time frame, it is writing log recursively. This happened when i
modified the machine date to next day.
For e.g.
2009-02-24 07:03:00,180 [INFO ] - This is cpu log
2009-02-24 07:03:00,195 [INFO ] - This is cpu log
2009-02-24 07:03:00,195 [INFO ] - This is cpu log
2009-02-24 07:03:00,195 [INFO ] - This is cpu log
2009-02-24 07:03:00,195 [INFO ] - This is cpu log
2009-02-24 07:03:00,195 [INFO ] - This is cpu log
--
View this message in context: http://www.nabble.com/Problem-with-DailyRollingFileAppender-tp22157763p22158184.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Problem with DailyRollingFileAppender
Posted by "Raghuveer.V" <ra...@infotechsw.com>.
prashant,
In case if you are using struts,
enable the struts logs and test it
log4j.logger.org.apache.struts=debug, struts
log4j.appender.struts=org.apache.log4j.RollingFileAppender
log4j.appender.struts.MaxFileSize=3000KB
log4j.appender.struts.MaxBackupIndex=20
log4j.appender.struts.layout=org.apache.log4j.PatternLayout
log4j.appender.struts.layout.ConversionPattern=%d~%p~%c~ %m%n
## Log file path
log4j.appender.struts.File=D:\\struts.log
----- Original Message -----
From: "prashant_4s" <pr...@four-soft.com>
To: <lo...@logging.apache.org>
Sent: Monday, February 23, 2009 2:40 PM
Subject: Problem with DailyRollingFileAppender
>
> I am having problem configuring daily logs in log4j.
>
> Once the date is changed on my machine, the existing log file name changes
> to current date and a new log file is created with all the previous log
> file
> contents appended repetitively.
> I have attached the log files and properties file.
>
>
> http://www.nabble.com/file/p22157763/log4j.properties log4j.properties
> http://www.nabble.com/file/p22157763/Cpu_Usage.log.2009-02-23
> Cpu_Usage.log.2009-02-23
> http://www.nabble.com/file/p22157763/Cpu_Usage.log Cpu_Usage.log
>
> Can someone help me on this?
>
> Thanks & Regards,
> Prashant
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-DailyRollingFileAppender-tp22157763p22157763.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org