That depends on how you are configuring (properties, xml, or code).
Searching the archives and/or Google will surely give some examples.

On Jan 30, 2008 8:21 AM, anoobthomas <[EMAIL PROTECTED]> wrote:
>
> Currently my log files are generated with a date stamp because I am using the
> Daily Rolling File Appender
>
> My requirement is that I want my log files without the date stamp, instead I
> want them as filename.log.1, filename.log.2, etc. as a sequence of numbers.
> You said Rolling File Appender would solve my problem. Could you be kind
> enough to show me how with an example?  I am rather new to log4j.
>
>
>
>
> carnold-3 wrote:
> >
> >
> > On Jan 28, 2008, at 6:47 AM, James A. N. Stauffer wrote:
> >
> >> I'm not sure what you want but RollingFileAppender will make files
> >> like what you want.
> >
> > If you do need to write custom code, I would recommend writing a
> > custom RollingPolicy for the
> > org.apache.log4j.rolling.RollingFileAppender (o.a.l.r.RFA) in the
> > extras companion (http://logging.apache.org/companions/extras).  The
> > o.a.l.r.RFA was designed to support pluggable RollingPolicies which
> > provide the strategy for renaming files and TriggeringPolicies which
> > provide the strategy for determining when to trigger files.  It seems
> > like you might just want to mix the FixedWindowRollingPolicy (which
> > provides .1, .2, etc file names) with a TimeBasedTriggeringPolicy.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Renaming-log-file-tp15128382p15183091.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
James A. N. Stauffer        http://www.geocities.com/stauffer_james/
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