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 O Siris <os...@yahoo.com> on 2003/04/29 10:49:53 UTC

Create a new log file on startup

Hi Everyone

i want log4j to create a new logfile on startup, based
on the date and time.  is this possible, the closest i
could find is the rolling file appender.
And since i might restart my app multiple times during
the day i would like a new file everytime.
eg: glog.(todaysDate).log

thnx very much 
kind regards
OSiris

<appender name="Rolling"  
class="org.apache.log4j.DailyRollingFileAppender">
   <param name="File" value="glog.log"/>
   <param name="DatePattern" value="'.'yyyy-MM-dd"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern"
value="%d{HH:mm:ss,SSS} %t %-5p %c{1} - %m%n"/>
    </layout>
  </appender>

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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