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 Milan Doshi <mi...@mphasis.com> on 2002/12/26 15:44:56 UTC
How to rename the rolled over file?
Hello Friends,
I am using Log4J version 1.2.7. I want to roll over the Log file every month and hence I am using the org.apache.log4j.DailyRollingFileAppender in my xml file.
i.e:
<appender name="ToFile" class="org.apache.log4j.DailyRollingFileAppender">
:
:
I would like to control the name of the rolled file. i.e.: currently it is named as
ErrorLogs.log.2002-20-12.
However I would like to name it as
ErrorLogs_12-20-2002.
How do I achieve this?
All help in this regard would be appreciated.
Thanks and regards,
Milan Doshi
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How to rename the rolled over file?
Posted by Daniel Serodio <da...@checkforte.com.br>.
<appender name="ToFile"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="DatePattern" value=".dd-MM-yyyy"/>
</appender>
Also, try reading the Javadoc for DailyRollingFileAppender, it's all
there.
On Thu, 2002-12-26 at 12:44, Milan Doshi wrote:
> Hello Friends,
>
> I am using Log4J version 1.2.7. I want to roll over the Log file every month and hence I am using the org.apache.log4j.DailyRollingFileAppender in my xml file.
> i.e:
> <appender name="ToFile" class="org.apache.log4j.DailyRollingFileAppender">
> :
> :
> I would like to control the name of the rolled file. i.e.: currently it is named as
> ErrorLogs.log.2002-20-12.
> However I would like to name it as
> ErrorLogs_12-20-2002.
> How do I achieve this?
>
> All help in this regard would be appreciated.
>
> Thanks and regards,
>
> Milan Doshi
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
[]'s
Daniel Serodio
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>