Thanks a million Norbert, i shall try it!!!

I owe you one... :-)

Thanks & Regards,
Kailash.K.N.
---- Original Message ----- From: "Norbert Toth-Gati" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[email protected]>
Sent: Thursday, May 18, 2006 5:05 PM
Subject: Re: Changing log name???


So follow this:

public class YourAppender extends org.apache.log4j.RollingFileAppender {

public void setFile(final String filename) {
       String year = Integer.toString(Calendar.getInstance().get(
Calendar.YEAR));
       String month = Integer.toString(Calendar.getInstance().get(
Calendar.MONTH));
       String day = Integer.toString(Calendar.getInstance().get(
Calendar.DAY_OF_MONTH));
       String actualDate = day + "-" + month + "-" +  year + "-";
       String newFileName += actualDate + filename;
 super.setFile(newFilename);
}
}

Regards
Norbert

On 5/18/06, Kailash KN <[EMAIL PROTECTED]> wrote:

Thanks Norbert, but i have no clue as to how i implement, as mentioned
earlier i have wasted two days on it, and finally i gave up, did'nt wanna
waste time on it again!!! :-)

If you could help me with it, i'd be grateful!!! :-)

Thanks & Regards,
Kailash.K.N.
----- Original Message -----
From: "Norbert Toth-Gati" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[email protected]>
Sent: Thursday, May 18, 2006 4:23 PM
Subject: Re: Changing log name???


>I think this is not supported yet by log4j version 1.2.x, so you should
> create your own implementation, extending RollingFileAppender.
>
> Regards
> Norbert
>
> On 5/18/06, Kailash KN <[EMAIL PROTECTED]> wrote:
>>
>>  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
>>
>> ******* 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]
>>
>>
>>
>



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




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