Hi,
Attached is the log4j.xml document, in which the name of the debug file is "debug.log", but i want the file to be name as "dd-mm-YYYY-debug.log". How do i achieve this??? I'm stuck with this for almost 2 days now. Plz help me out.
 
Thanks & Regards,
Kailash
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration>

 <!--Appender to accept only debug msgs-->	
 <appender name="debugLogger"
 class="org.apache.log4j.RollingFileAppender">
         <param name="File" value="debug.log"/>
         <param name="MaxFileSize" value="1MB"/>
         <param name="MaxBackupIndex" value="1"/>
      <param name="Append" value="true" />
      <layout  class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"  value="%d{dd-MMM-yyyy    HH:mm:ss} 
             %-4r[%t]%-5p%c%x - %m%n."/>
         </layout>
         <!--Filter to log debug messages only-->
   <filter
 class="org.apache.log4j.varia.LevelMatchFilter" >
      <param name="LevelToMatch" value="debug"/>
      <param name="AcceptOnMatch" value="true"/>
   </filter>       
   
      <filter
 class="org.apache.log4j.varia.DenyAllFilter"/>
 </appender>
 
 <!--Appender to accept only info msgs-->
 <appender name="infoLogger"
 class="org.apache.log4j.RollingFileAppender">
          <param name="File" value="info.log"/>
    <param name="MaxFileSize" value="10KB"/>
          <param name="MaxBackupIndex" value="1"/>
          <layout 
 class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern"  value="%-5r %-5p [%t] %c{2} - 
            															%m%n"/>
         </layout>
 
   <!--Filter to log info messages only-->
         <filter
 class="org.apache.log4j.varia.LevelMatchFilter" >
            <param name="LevelToMatch" value="info"/>
            <param name="AcceptOnMatch" value="true"/>
         </filter>
        <filter
 class="org.apache.log4j.varia.DenyAllFilter"/>
                
 </appender>
 
 <root>
   <level value="debug"/>
   <appender-ref ref="debugLogger"/>
 <appender-ref ref="infoLogger"/>
 </root>
 
 </log4j:configuration> 
 
******* DISCLAIMER: This email and any files transmitted with it are privileged 
and confidential information and intended solely for the use of the individual 
or entity to which they are addressed. If you are not the intended recipient, 
please notify the sender by e-mail and delete the original message. Further, 
you are not to copy, disclose, or distribute this e-mail or its contents to any 
other person and any such actions are unlawful. This e-mail may contain 
viruses. Torry Harris Business Solutions has taken every reasonable precaution 
to minimize this risk, but is not liable for any damage you may sustain as a 
result of any virus in this e-mail.  The recipient should check this email and 
any attachments for the presence of viruses. THBS reserves the right to monitor 
and review the content of all messages sent to or from this e-mail 
address********

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to