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 wolverine my <wo...@gmail.com> on 2006/06/07 03:47:14 UTC

DailyRollingFileAppender configuration

Hi

With the following Log4j configuration

   log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
   log4j.appender.R.File=sample.log
   log4j.appender.R.DatePattern='.'yyyy-MM-dd


The sample.log will be copied to sample.log.2006-06-06, example,

   sample.log
   sample.log.2006-06-06
   sample.log.2006-06-05

How can we configure the LOg4j so that the file will be copied as
sample.2006-06-06.log?
For example,

   sample.log
   sample.2006-06-06.log
   sample.2006-06-05.log

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


Re: DailyRollingFileAppender configuration

Posted by James Stauffer <st...@gmail.com>.
You would have to write your own appender to achieve that.

On 6/6/06, wolverine my <wo...@gmail.com> wrote:
> Hi
>
> With the following Log4j configuration
>
>    log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
>    log4j.appender.R.File=sample.log
>    log4j.appender.R.DatePattern='.'yyyy-MM-dd
>
>
> The sample.log will be copied to sample.log.2006-06-06, example,
>
>    sample.log
>    sample.log.2006-06-06
>    sample.log.2006-06-05
>
> How can we configure the LOg4j so that the file will be copied as
> sample.2006-06-06.log?
> For example,
>
>    sample.log
>    sample.2006-06-06.log
>    sample.2006-06-05.log
>
> ---------------------------------------------------------------------
> 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