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 sudhakardvvn <dv...@yahoo.com> on 2006/07/14 07:32:51 UTC

TimeStamp for the backupfiles

Hi,
Iam using log4j in my applicaiton. I am using rollingFileAppender class for
creating backup files. My backup log files will be logfile.1,logile.2 like
that. I wany my backup log file names shoule be time stamped like this
logfiel.14-07-06:12:00:00 . Can any body guide me how to achive it.

Thanks in Advance
Sudhakar
-- 
View this message in context: http://www.nabble.com/TimeStamp-for-the-backupfiles-tf1941557.html#a5321537
Sent from the Log4j - Users forum at Nabble.com.

Re: TimeStamp for the backupfiles

Posted by sudhakardvvn <dv...@yahoo.com>.
Is there any way that I can achieve this by using rollingFileAppender instead
of DailyRollingFile Appender
-- 
View this message in context: http://www.nabble.com/TimeStamp-for-the-backupfiles-tf1941557.html#a5321958
Sent from the Log4j - Users forum 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: TimeStamp for the backupfiles

Posted by jaikiran pai <ja...@yahoo.co.in>.
Try this out:
   

<appender name="MY_LOG" class="org.apache.log4j.DailyRollingFileAppender">
      <param name="File" value="D:/mylog.log"/>
      <param name="Append" value="false"/>
 
      <!-- Rollover at midnight each day -->
      <param name="DatePattern" value="&apos;.&apos;yyyy-MM-dd"/>      
<layout class="org.apache.log4j.PatternLayout">
         <!-- The default pattern: Date Priority [Category] Message\n -->
       <param name="ConversionPattern" value="%d{ISO8601}  %-5p [%c] %m%n"/>
      </layout>
   </appender>
   
  regards,
  -Jaikiran

sudhakardvvn <dv...@yahoo.com> wrote:
  
Hi,
Iam using log4j in my applicaiton. I am using rollingFileAppender class for
creating backup files. My backup log files will be logfile.1,logile.2 like
that. I wany my backup log file names shoule be time stamped like this
logfiel.14-07-06:12:00:00 . Can any body guide me how to achive it.

Thanks in Advance
Sudhakar
-- 
View this message in context: http://www.nabble.com/TimeStamp-for-the-backupfiles-tf1941557.html#a5321537
Sent from the Log4j - Users forum at Nabble.com.


 				
---------------------------------
 Find out what India is talking about on  Yahoo! Answers India.
 So, whatÂ’s NEW about the NEW Yahoo! Messenger? Find out.