For log4j 1.2 you would need to create a new FileAppender class.

On 5/11/06, Kailash KN <[EMAIL PROTECTED]> wrote:
Thanks Dirk and James, but i use a property file not an XML file, anyways
ill give it a shot.

james, i did not understand your reply, could be please be more precise.

Thanks & Regards,
Kailash.K.N.

----- Original Message -----
From: "dirk ooms" <[EMAIL PROTECTED]>
To: "Log4J Users List" <log4j-user@logging.apache.org>
Sent: Thursday, May 11, 2006 7:23 PM
Subject: Re: Stuck with file format!!!


> in log4j1.3, i do something like this to put the date in the filename
>
>  <appender name="myAppender"
> class="org.apache.log4j.rolling.RollingFileAppender">
>    <param name="Threshold" value="DEBUG"/>
>    <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
>      <param name="FileNamePattern" value="%d{yyyy-MM-dd}.log.gz"/>
>    </rollingPolicy>
>    <layout class="org.apache.log4j.PatternLayout">
>      <param name="ConversionPattern" value="[%d{HH:mm:ss}, %p, %c{1}]
> %m%n"/>
>    </layout>
>  </appender>
>
>
> On Thursday 11 May 2006 15:21, Kailash KN wrote:
>> Hi,
>> I would like to have my Debug and Info messages into Debug.log and
>> Info.log
>> respectively, this works fine, but now i would like to have it in the log
>> files with the format-   yyyy-MM-dd-Debug.log  and yyyy-MM-dd-Info.log
>> respectively. how do i go about it???
>>
>> Any help would be greatly appreciated!!!
>>
>> Thanks & Regards,
>> Kailash.K.N.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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




--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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

Reply via email to