<putting foot in mouth>

I promise not to ask any more questions without thoroughly looking 
through the docs ;)  First I see that JAXP thing is in the FAQ,
and now I see there's a DailyRollingFileAppender already.

Sorry for the multiple messages, confusion, etc...

Yoav

Yoav Shapira wrote:
> 
> Hi there,
> I'd like to have a FileAppender that automatically rolls over at
> midnight each day and appends the date (preferably in a specified
> format, see example below) and labels its file with the date it
> was created.  Is such a thing available already in log4j, or would
> it be a welcome addition if someone were to write it?
> 
> Sample XML:
> <appender
>         name="dailyLogFile"
>         class="org.apache.log4j.DailyFileAppender">
>   <param name="File" value="dailyLog." />
>   <param name="DateFormat" value="yyyy-mmm-dd" />
>   <layout ... />
> </appender>
> 
> Say my logging directory is /temp/log and today is 2001-Oct-18.
> What I'd like to happen is when log4j is started, a file
> /temp/log/dailyLog.2001-Oct-18 is created.  Everything works normally.
> At midnight between 2001-Oct-18 and 2001-Oct-19, that file is closed
> and a new one is opened,
> /temp/log/dailyLog.2001-Oct-19
> with the same priority, configuration, etc.
> 
> Sorry for the verbosity of the message.  Is something like this doable
> with the existing API?  I know Tomcat4.0 does something similar with
> its log files, which supposedly use log4j...
> Thanks,
> 
> Yoav Shapira

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

Reply via email to