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 Yogi Nerella <yn...@gmail.com> on 2013/02/14 18:55:43 UTC

how to set to RollingFileAppender interval to 5 minutes.

HI,

How to set interval in minutes, if we want to Roll every 5 minutes?

Currently it is only accepting in hours?

Yogi

Re: how to set to RollingFileAppender interval to 5 minutes.

Posted by Ralph Goers <ra...@dslextreme.com>.
I meant the data pattern in the filePattern attribute. As an example see https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/core/src/test/resources/log4j-rolling2.xml. It is configured to roll every 2 seconds and to modulate.

Ralph


On Feb 15, 2013, at 2:18 PM, Yogi Nerella wrote:

> Ralph,
> 
> when I configure DatePattern, I recieve the following message, but it
> honors the parameter and generates the log files as configured.
> 
> Is this a bug?
> 
> 2013-02-15 11:59:11,233 ERROR RollingFile contains an invalid element or
> attribute "DatePattern"
> 
> Yogi
> 
> 
> 
> On Thu, Feb 14, 2013 at 10:39 AM, Ralph Goers <ra...@dslextreme.com>wrote:
> 
>> You should be able to set the pattern to include minutes and then specify
>> the interval on the TriggeringPolicy.  If you set it to 5 then it should
>> roll every 5 minutes. If you specify modulate as true then it will occur on
>> the 5, 10, 15, etc minute of the hour.
>> 
>> Ralph
>> 
>> 
>> On Feb 14, 2013, at 9:55 AM, Yogi Nerella wrote:
>> 
>>> HI,
>>> 
>>> How to set interval in minutes, if we want to Roll every 5 minutes?
>>> 
>>> Currently it is only accepting in hours?
>>> 
>>> Yogi
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 


Re: how to set to RollingFileAppender interval to 5 minutes.

Posted by Yogi Nerella <yn...@gmail.com>.
Ralph,

when I configure DatePattern, I recieve the following message, but it
honors the parameter and generates the log files as configured.

Is this a bug?

2013-02-15 11:59:11,233 ERROR RollingFile contains an invalid element or
attribute "DatePattern"

Yogi



On Thu, Feb 14, 2013 at 10:39 AM, Ralph Goers <ra...@dslextreme.com>wrote:

> You should be able to set the pattern to include minutes and then specify
> the interval on the TriggeringPolicy.  If you set it to 5 then it should
> roll every 5 minutes. If you specify modulate as true then it will occur on
> the 5, 10, 15, etc minute of the hour.
>
> Ralph
>
>
> On Feb 14, 2013, at 9:55 AM, Yogi Nerella wrote:
>
> > HI,
> >
> > How to set interval in minutes, if we want to Roll every 5 minutes?
> >
> > Currently it is only accepting in hours?
> >
> > Yogi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: how to set to RollingFileAppender interval to 5 minutes.

Posted by Ralph Goers <ra...@dslextreme.com>.
You should be able to set the pattern to include minutes and then specify the interval on the TriggeringPolicy.  If you set it to 5 then it should roll every 5 minutes. If you specify modulate as true then it will occur on the 5, 10, 15, etc minute of the hour.

Ralph


On Feb 14, 2013, at 9:55 AM, Yogi Nerella wrote:

> HI,
> 
> How to set interval in minutes, if we want to Roll every 5 minutes?
> 
> Currently it is only accepting in hours?
> 
> Yogi


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