
Hi, I am referring to http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy. Below is the log4j.properties. log4j.rootLogger=INFO, R log4j.appender.R=org.apache.log4j.DailyRollingFileAppender log4j.appender.R.File=${catalina.home}/logs/catalina.out log4j.appender.R.DatePattern='.'yyyy-MM-dd log4j.appender.R.layout=org.apache.log4j.PatternLayout Basically if i set log4j.appender.R.DatePattern='.'yyyy-MM-dd in log4j.properties It rolls over at midnight. is there a way to roll over at say 12:00 Noon afternoon I think its possible using TimeBasedRollingPolicy but not sure how to use it. Please help me understand with examples Thanks and Regards Kaushal

Hello Kaushal, Although there have been other requests for this feature, logback does not currently support rolling at a specified time. By the way, why do you need to roll over at a specified time? What's wrong with midnight? On 08/07/2010 4:03 PM, Kaushal Shriyan wrote:
Hi,
I am referring to http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy. Below is the log4j.properties.
log4j.rootLogger=INFO, R log4j.appender.R=org.apache.log4j.DailyRollingFileAppender log4j.appender.R.File=${catalina.home}/logs/catalina.out log4j.appender.R.DatePattern='.'yyyy-MM-dd log4j.appender.R.layout=org.apache.log4j.PatternLayout
Basically if i set log4j.appender.R.DatePattern='.'yyyy-MM-dd in log4j.properties It rolls over at midnight. is there a way to roll over at say 12:00 Noon afternoon I think its possible using TimeBasedRollingPolicy but not sure how to use it.
Please help me understand with examples
Thanks and Regards
Kaushal

On Thu, Jul 8, 2010 at 9:17 PM, Ceki Gülcü <ceki@qos.ch> wrote:
Hello Kaushal,
Although there have been other requests for this feature, logback does not currently support rolling at a specified time. By the way, why do you need to roll over at a specified time? What's wrong with midnight?
On 08/07/2010 4:03 PM, Kaushal Shriyan wrote:
Hi,
I am referring to http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy. Below is the log4j.properties.
log4j.rootLogger=INFO, R log4j.appender.R=org.apache.log4j.DailyRollingFileAppender log4j.appender.R.File=${catalina.home}/logs/catalina.out log4j.appender.R.DatePattern='.'yyyy-MM-dd log4j.appender.R.layout=org.apache.log4j.PatternLayout
Basically if i set log4j.appender.R.DatePattern='.'yyyy-MM-dd in log4j.properties It rolls over at midnight. is there a way to roll over at say 12:00 Noon afternoon I think its possible using TimeBasedRollingPolicy but not sure how to use it.
Please help me understand with examples
Thanks and Regards
Kaushal
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
Hi Ceki, Since our servers are hosted on different timezones, so taking care of the layover. Please suggest/further Thanks and Regards Kaushal

Ceki Gülcü wrote:
By the way, why do you need to roll over at a specified time? What's wrong with midnight?
It can be beneficial to stagger batch job times in large virtual environments with shared disks to avoid thousands of VMs rolling and compressing files at the same time, which can put cause IO contention. -Gordon

I came across the same problem last March and raised a jira (LBCORE-138) There you find a solution which works for us. Mind you we have not upgraded from 0.9.18 yet as we would need to hack the RollingCalender again to allow for this solution. Hence the bug I raised at the time. Given the interest of others the small change needed in RollingCalender might come in the next release ? Ceki ? Cheers Andy -----Original Message----- From: logback-user-bounces@qos.ch [mailto:logback-user-bounces@qos.ch] On Behalf Of Gordon Sims Sent: Friday, 9 July 2010 1:56 AM To: logback users list Subject: Re: [logback-user] Time based rolling policy Ceki Gülcü wrote:
By the way, why do you need to roll over at a specified time? What's wrong with midnight?
It can be beneficial to stagger batch job times in large virtual environments with shared disks to avoid thousands of VMs rolling and compressing files at the same time, which can put cause IO contention. -Gordon _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

On Fri, Jul 9, 2010 at 4:09 AM, Andreas Dejung <andreas.dejung@velsys.com> wrote:
I came across the same problem last March and raised a jira (LBCORE-138) There you find a solution which works for us. Mind you we have not upgraded from 0.9.18 yet as we would need to hack the RollingCalender again to allow for this solution. Hence the bug I raised at the time.
Given the interest of others the small change needed in RollingCalender might come in the next release ? Ceki ?
Cheers Andy
Hi Andy, Thanks for the quick reply. Can you please guide me with the steps to get along this problem Thanks and Regards Kaushal
participants (4)
-
Andreas Dejung
-
Ceki Gülcü
-
Gordon Sims
-
Kaushal Shriyan