Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 77625 invoked from network); 11 May 2009 12:34:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 May 2009 12:34:17 -0000 Received: (qmail 1487 invoked by uid 500); 11 May 2009 12:34:16 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 1423 invoked by uid 500); 11 May 2009 12:34:16 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 1412 invoked by uid 99); 11 May 2009 12:34:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 May 2009 12:34:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 May 2009 12:34:06 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1M3UhV-0002jN-PR for log4j-user@logging.apache.org; Mon, 11 May 2009 05:33:45 -0700 Message-ID: <23482416.post@talk.nabble.com> Date: Mon, 11 May 2009 05:33:45 -0700 (PDT) From: Marc Farrow To: log4j-user@logging.apache.org Subject: Re: DailyRollingAppender - How does it know when to rollover? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: marc.farrow@gmail.com References: <23390773.post@talk.nabble.com> <44B76DF56DE7A843BB5E8109DC4EEB1204D5BE7DDE@sbapexch05> <23392469.post@talk.nabble.com> <23392539.post@talk.nabble.com> <23481523.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org I checked the log file for my container (Tomcat) and there were no error messages that I could see for any rollover messages. However, I guess I am going to have to wait til next month to verify. Since my container is Tomcat and my container gets restarted fairly often (multiple times a day because this is a our development server), could this affect the rollover logic? Thank you, Marc Paul Smith-2 wrote: > > the first logging event _after_ the time period computed should roll > the file over, however if there is any failure (perhaps because > another process has the file handle open, a common problem on > Windows), the rollover can fail, and you'll need to wait to the next > window (another month). > > When the failure occurs, it does log to StdErr (from the source code > to DailyRollingFileAppender): > > protected void subAppend(LoggingEvent event) { > long n = System.currentTimeMillis(); > if (n >= nextCheck) { > now.setTime(n); > nextCheck = rc.getNextCheckMillis(now); > try { > rollOver(); > } > catch(IOException ioe) { > if (ioe instanceof InterruptedIOException) { > Thread.currentThread().interrupt(); > } > LogLog.error("rollOver() failed.", ioe); > } > } > super.subAppend(event); > } > > It tries it's best to continue logging until next roll over period. > > Paul > > On 11/05/2009, at 9:31 PM, Marc Farrow wrote: > >> >> This is a fairly simple question. Does anyone that maintains or >> create LOG4J >> read these posts anymore? >> >> Thanks. >> >> -- >> View this message in context: >> http://www.nabble.com/DailyRollingAppender---How-does-it-know-when-to-rollover--tp23390773p23481523.html >> Sent from the Log4j - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org >> For additional commands, e-mail: log4j-user-help@logging.apache.org >> > > Paul Smith > Production Engineering Manager > > Aconex > The easy way to save time and money on your project > > 696 Bourke Street, Melbourne, > VIC 3000, Australia > Tel: +61 3 9240 0200 Fax: +61 3 9240 0299 > Email: psmith@aconex.com www.aconex.com > > This email and any attachments are intended solely for the addressee. > The contents may be privileged, confidential and/or subject to > copyright or other applicable law. No confidentiality or privilege is > lost by an erroneous transmission. If you have received this e-mail in > error, please let us know by reply e-mail and delete or destroy this > mail and all copies. If you are not the intended recipient of this > message you must not disseminate, copy or take any action in reliance > on it. The sender takes no responsibility for the effect of this > message upon the recipient's computer system. > > > > > > -- View this message in context: http://www.nabble.com/DailyRollingAppender---How-does-it-know-when-to-rollover--tp23390773p23482416.html Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org