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 Andre Dantas Rocha <ad...@uol.com.br> on 2006/07/27 15:41:59 UTC

DailyRollingFileAppender & DatePattern

Hi all,

My current log configuration is:

<param name="File" value="SYSTEM"/>
<param name="DatePattern" value="'-'dd-MM-yyyy'.log'"/>

And the generated files:

SYSTEM (first file)
SYSTEM-01-02-2006.log
SYSTEM-02-02-2006.log
SYSTEM-03-02-2006.log

Is there a way to make the first file (SYSTEM) follow the rolling configuration, so I would have:

SYSTEM-01-02-2006.log (first file)
SYSTEM-02-02-2006.log
SYSTEM-03-02-2006.log

Thanks,

André




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: DailyRollingFileAppender & DatePattern

Posted by James Stauffer <st...@gmail.com>.
I have wrote an appender that does that.
http://stauffer.james.googlepages.com/DateFormatFileAppender.java

On 7/27/06, Andre Dantas Rocha <ad...@uol.com.br> wrote:
> Hi all,
>
> My current log configuration is:
>
> <param name="File" value="SYSTEM"/>
> <param name="DatePattern" value="'-'dd-MM-yyyy'.log'"/>
>
> And the generated files:
>
> SYSTEM (first file)
> SYSTEM-01-02-2006.log
> SYSTEM-02-02-2006.log
> SYSTEM-03-02-2006.log
>
> Is there a way to make the first file (SYSTEM) follow the rolling configuration, so I would have:
>
> SYSTEM-01-02-2006.log (first file)
> SYSTEM-02-02-2006.log
> SYSTEM-03-02-2006.log
>
> Thanks,
>
> André
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


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

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org