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 Kenneth Litwak <kl...@apu.edu> on 2005/12/01 19:34:42 UTC

Automatic "Daily" logging files

  I am trying to change how we keep logged data.  In my IBM mainframe
days, there was a way to get automatic log files with names based upon
the day, without ever bringing the application down.  So there would be
the following, simplified:
ApplicationData11212005.log
ApplicationData11222005.log
ApplicationData11232005.log

I'm trying to find a way to get log4j to do this.  I don't' want to stop
my application or have to manually have a sys admin make a backup of the
current log files and give the copies a new name like this, but I want
to be able to not have one huge log file and yet be able to go back to
logging data from a specific date to track down errors.  Can this be
done automatically through configuration?  Thanks.


Ken

 Kenneth D. Litwak
Software Engineer III
IMT
Azusa Pacific University
901 E. Alosta
Azusa, CA 91702


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: Automatic "Daily" logging files

Posted by Burton Strauss <Bu...@SmallNetSolutions.com>.
Look at this:

http://logging.apache.org/log4j/docs/api/org/apache/log4j/DailyRollingFileAp
pender.html 

I think that does what you want... And more...

-----Burton

-----Original Message-----
From: Kenneth Litwak [mailto:klitwak@apu.edu] 
Sent: Thursday, December 01, 2005 12:35 PM
To: log4j-user@logging.apache.org
Subject: Automatic "Daily" logging files

  I am trying to change how we keep logged data.  In my IBM mainframe days,
there was a way to get automatic log files with names based upon the day,
without ever bringing the application down.  So there would be the
following, simplified:
ApplicationData11212005.log
ApplicationData11222005.log
ApplicationData11232005.log

I'm trying to find a way to get log4j to do this.  I don't' want to stop my
application or have to manually have a sys admin make a backup of the
current log files and give the copies a new name like this, but I want to be
able to not have one huge log file and yet be able to go back to logging
data from a specific date to track down errors.  Can this be done
automatically through configuration?  Thanks.


Ken

 Kenneth D. Litwak
Software Engineer III
IMT
Azusa Pacific University
901 E. Alosta
Azusa, CA 91702


---------------------------------------------------------------------
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