Return-Path: Delivered-To: apmail-jakarta-log4j-user-archive@apache.org Received: (qmail 37720 invoked from network); 4 Sep 2002 14:28:35 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Sep 2002 14:28:35 -0000 Received: (qmail 10696 invoked by uid 97); 4 Sep 2002 14:29:02 -0000 Delivered-To: qmlist-jakarta-archive-log4j-user@jakarta.apache.org Received: (qmail 10670 invoked by uid 97); 4 Sep 2002 14:29:01 -0000 Mailing-List: contact log4j-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@jakarta.apache.org Received: (qmail 10657 invoked by uid 98); 4 Sep 2002 14:29:01 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: "Shawn Wilson" To: "Log4J Users List" Subject: RE: DailyRollingFileAppender does not create backup file Date: Wed, 4 Sep 2002 08:28:25 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <21D69ED9FBBCD244B4F90368B4CD045D4D6BE0@gtsny19> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Are you running log4j in a standalone application or as part of a servlet container like Tomcat? I'm running it under Tomcat and when it doesn't work for me I can see the following error in stderr.log: log4j:ERROR Failed to rename [e:/WebApps/atmreports/cvsroot/ATMReports/ATMRealtime_NYCE/WEB-INF/logs/Nyce .log] to [e:/WebApps/atmreports/cvsroot/ATMReports/ATMRealtime_NYCE/WEB-INF/logs/Nyce .log.2002-08-29]. Now, I looked through the sourcecode and found that DailyRollingFileAppender is using File.rename() to rename the file. I've done my own testing with this method and have successfully been able to get it to fail sometimes, though I can't determine the cause. As far as I'm concerned, File.rename() is just not reliable enough to rename files (at least on Win2k). -shawn ==================================== Shawn Wilson [shawnw@atmreports.com] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 ==================================== > -----Original Message----- > From: Bhangale, Bhushan [mailto:Bhushan.Bhangale@g-trade.com] > Sent: Wednesday, September 04, 2002 7:05 AM > To: 'Log4J Users List' > Subject: RE: DailyRollingFileAppender does not create backup file > > > I am using this jar log4j-1.2.6.jar on windows 2000. > > log4j.rootCategory=DEBUG, file > log4j.appender.file=org.apache.log4j.DailyRollingFileAppender > log4j.appender.file.file=${logFile.path} > log4j.appender.console.Threshold=INFO > log4j.appender.console.ImmediateFlush=true > log4j.appender.file.DatePattern='.'yyyy-MM-dd-HH > > Log4j initializes smoothly no error I get. > > The logging is continuous. I understand that the logger rolls the > file after > every hour only if it will get any log event. But its not doing that. > > -----Original Message----- > From: Thomas Muller [mailto:ttm@online.no] > Sent: Wednesday, September 04, 2002 8:42 AM > To: Log4J Users List > Subject: RE: DailyRollingFileAppender does not create backup file > > > What Log4j version is this? Which OS? What does your > configuration file look > like? Are you getting any Log4j ERR or WARN statements on std err when you > expect logging to occur (and the file to roll)? Could you please > submit the > smallest possible program that demonstrates what you interpret as a flaw? > > -- > > Thomas > > > | -----Original Message----- > | From: Bhangale, Bhushan [mailto:Bhushan.Bhangale@g-trade.com] > | Sent: 04 September 2002 13:36 > | To: 'Log4J Users List' > | Subject: RE: DailyRollingFileAppender does not create backup file > | > | > | I know Thomas. But its not happening at all. When I restart the > | application onlt at that time it rolls the file. > | > | -----Original Message----- > | From: Thomas Muller [mailto:ttm@online.no] > | Sent: Wednesday, September 04, 2002 6:29 AM > | To: Log4J Users List > | Subject: RE: DailyRollingFileAppender does not create backup file > | > | > | Keep in mind that the DailyRollingFileAppender is not supposed to roll > | over exactly at the time specified, merely at the first log-event that > | occurrs after that time is passed. The reason is simply that the > | rollover is handled > | in the same thread as the logging occurrs. > | > | -- > | > | Thomas > | > | > | | -----Original Message----- > | | From: Bhangale, Bhushan [mailto:Bhushan.Bhangale@g-trade.com] > | | Sent: 03 September 2002 21:22 > | | To: 'Log4J Users List' > | | Subject: RE: DailyRollingFileAppender does not create backup file > | | > | | > | | I am also facing the same problem. I have set for hourly rolling but > | | it doesn't happen. It happens only when I stop my application and > | | again starts it. At that time it rolls the old file and creates a > | | new file. Is that rolling appender is supposed to do. > | | > | | -----Original Message----- > | | From: Shawn Wilson [mailto:shawnw@atmreports.com] > | | Sent: Tuesday, September 03, 2002 2:47 PM > | | To: Log4J Users List > | | Subject: RE: DailyRollingFileAppender does not create backup file > | | > | | > | | Well, I'm glad to see that someone else is having the same problem I > | | am. Though I have my DailyRollingFileAppender set to backup once a > | | day and it's running under Tomcat. Sometimes it'll work for a few > | | days and then just stop rolling the logs. I can't figure it out. Let > | | me know if you figure out what's causing the problem. > | | > | | -shawn > | | > | | ==================================== > | | Shawn Wilson [shawnw@atmreports.com] > | | Software Developer, ATMReports.com > | | PH: 877-327-0873, FAX: 406-294-5806 > | | ==================================== > | | > | | > | | > -----Original Message----- > | | > From: Schmied Alexander [mailto:Alexander.Schmied@systema.info] > | | > Sent: Tuesday, September 03, 2002 1:12 AM > | | > To: 'log4j-user@jakarta.apache.org' > | | > Subject: DailyRollingFileAppender does not create backup file > | | > > | | > > | | > i'm using Log4j with DailyRollingFileAppender and for testing i've > | | > configured the appender to roll every minute. the problem is, that > | | > the debug-output of Log4j logs that the file will be renamed and > | | > no error occured, but there are no backup files in the directory. > | | > Here the debug-output of Log4j: > | | > > | | > log4j: c:/log/rel33/Log4j/test.log -> > | | > c:/log/rel33/Log4j/test.log.2002-09-03-08-49 > | | > log4j: setFile called: c:/log/rel33/Log4j/test.log, false > | | > log4j: setFile ended > | | > > | | > The file test.log exists in the directory and is empty after every > | | > minute but the file test.log.2002-09-03-08-49 is never created. > | | > What can be the problem here? > | | > > | | > Thanks, Alex. > | | > > | | > > | | > -- > | | > To unsubscribe, e-mail: > | | > > | | > For additional commands, e-mail: > | | > > | | > > | | > > | | > | | > | | -- > | | To unsubscribe, e-mail: > | > | For additional commands, e-mail: > > > > "The information in this e-mail, and any attachment therein, is > confidential > and for use by the addressee only. If you are not the intended recipient, > please return the e-mail to the sender and delete it from your computer. > Although The Bank of New York attempts to sweep e-mail and attachments for > viruses, it does not guarantee that either are virus-free and accepts no > liability for any damage sustained as a result of viruses." > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > > > ************************************************************************* > Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. > The information supplied in this email should be treated in confidence. No > liability whatsoever is accepted for any loss or damage suffered > as a result > of accessing this message or any attachments. > > ________________________________________________________________________ > This email has been scanned for all viruses by the MessageLabs SkyScan > service. For more information on a proactive anti-virus service working > around the clock, around the globe, visit http://www.messagelabs.com > ________________________________________________________________________ > > -- > To unsubscribe, e-mail: For additional commands, e-mail: "The information in this e-mail, and any attachment therein, is confidential and for use by the addressee only. If you are not the intended recipient, please return the e-mail to the sender and delete it from your computer. Although The Bank of New York attempts to sweep e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses." -- To unsubscribe, e-mail: For additional commands, e-mail: ************************************************************************* Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. The information supplied in this email should be treated in confidence. No liability whatsoever is accepted for any loss or damage suffered as a result of accessing this message or any attachments. ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ -- To unsubscribe, e-mail: For additional commands, e-mail: "The information in this e-mail, and any attachment therein, is confidential and for use by the addressee only. If you are not the intended recipient, please return the e-mail to the sender and delete it from your computer. Although The Bank of New York attempts to sweep e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses." -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: