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 Shawn Wilson <sh...@atmreports.com> on 2002/09/09 18:52:10 UTC

RE: Regarding DailyRollingFileAppender

Arun,

Hmm that is odd. When I've used it, it rolls over the log whether I'm using
the application or not. When it starts up, it's supposed to check the
modification date of the log file, and if it's the previous day, it will
roll it then and there. So if your application is not running overnight,
then the next day when you start it, it will roll the log file (but only
after something actually gets logged). It won't actually roll it until
something new gets logged, since rolling is part of the logging procedure.

Now, I've been having problems with the way it renames the files, so I'm
thinking of making some modifications for our purposes:

- Let's say the log name is mylog.log
- Instead of the current logging going into mylog.log, it will actually make
a mylog.2002-09-09.log file for the current day and log in there.
- That way, there will never be a mylog.log file, so ALL the logs (even the
current one) will be dated.

If you think this modification will interest you, let me know and I'll send
it to you once I finish.

-shawn
====================================
Shawn Wilson [shawnw@atmreports.com]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806
====================================


  -----Original Message-----
  From: Arun Jannela [mailto:arun.jannela@wipro.com]
  Sent: Monday, September 09, 2002 10:36 AM
  To: shawnw@atmreports.com
  Subject: Regarding DailyRollingFileAppender


  Hi Shawn,



  The DailyRollingFileAppender in log4j1.2.6, would roll over the file at



   the designated time, only if someone was using the application at the



   time.



   For example, I had set mine to change at midnight and found that I had



   to be using the application at midnight for it to work.



   I have changed the time and tested but I was unable to get the file.I got

   only todays file If send the request it creates the file







   Please pass some suggestions to me. As it was very urgent.





   Regards,

  Arun