File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Other Open Source Projects
Problems with DailyRollingFileAppender in log4j
Joined: Oct 07, 2003
Aug 24, 2005 21:23:00
I am facing a strange issue using DailyRollingFileAppender of log4j.
I want to append the date to my logfile's name Eg. Sample.log.25_08_2005 , so that i get the logs for all days in seperate files.
For this DailyRollingFileAppender can be used which rolls at the midnight and renames your file with the name appended by the date of the day.
But since my application which uses log4j is a standalone application and not a client server application, so it does not roll back and i get the log file by the name Sample.log itself.
On googling i found for DailyRollingFileAppender to work, your application should be running at midnight ; but in my case this cant happen.
So can anyone tell me how to achieve this using log4j i.e. appending date to the filename.I dont want to code additionaly to attain this.I am sure log4j is robust enough to support this.
Please help me out if incase any guys have faced the same issue.
Thanks in advance,
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
I agree. Here's the link:
subject: Problems with DailyRollingFileAppender in log4j
How to set maxsize of logfile
DaiylRollingFileAppender | log4j
log3j DailyRolligProblem in Solaris
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014