logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Wilson" <sha...@atmreports.com>
Subject RE: DailyRollingFileAppender does not create backup file
Date Wed, 04 Sep 2002 14:28:25 GMT
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:
> | | > <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> | | > For additional commands, e-mail:
> | | > <mailto:log4j-user-help@jakarta.apache.org>
> | | >
> | | >
> | |
> | |
> | | --
> | | To unsubscribe, e-mail:
> | <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> | For additional commands, e-mail:
> <mailto:log4j-user-help@jakarta.apache.org>
>
>
> "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:
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:log4j-user-help@jakarta.apache.org>
>
>
>
>
> *************************************************************************
> 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:
<mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


"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:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>




*************************************************************************
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:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


"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:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message