But, I thought log4j was thread-safe. Why do I need to synchronize access to
the Loggers?

-shawn

====================================
Shawn Wilson [[EMAIL PROTECTED]]
Software Developer, ATMReports.com
PH: 877-327-0873, FAX: 406-294-5806
====================================

-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 6:10 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: DailyRollingFileAppender not renaming files



Synchronise the threads..
i.e. declaring the most heavily trafficked I/O methods() with 'synchronised'
Good Luck,
Martin Gainty

______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relating to the official
business of Laconia Data Systems (LDS) is proprietary to the company. It is
confidential, legally privileged and protected by law. LDS does not own and
endorse any other content. Views and opinions are those of the sender unless
clearly stated as being that of LDS.
The person addressed in the e-mail is the sole authorised recipient. Please
notify the sender immediately if it has unintentionally reached you and do
not read, disclose or use the content in any way.
LDS can not assure that the integrity of this communication has been
maintained nor that it is free of errors, virus, interception or
interference.
             _______________________________________________

>From: "Shawn Wilson"
>Reply-To: "Log4J Users List"
>To:
>Subject: DailyRollingFileAppender not renaming files
>Date: Wed, 28 Aug 2002 09:04:51 -0600
>MIME-Version: 1.0
>Received: from nagoya.betaversion.org ([192.18.49.131]) by
mc1-f8.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Wed, 28 Aug
2002 08:04:59 -0700
>Received: (qmail 8244 invoked by uid 97); 28 Aug 2002 15:05:22 -0000
>Received: (qmail 8232 invoked by uid 98); 28 Aug 2002 15:05:22 -0000
>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>Precedence: bulk
>List-Unsubscribe:
>List-Subscribe:
>List-Help:
>List-Post:
>List-Id: "Log4J Users List"
>Delivered-To: mailing list [EMAIL PROTECTED]
>X-Antivirus: nagoya (v4218 created Aug 14 2002)
>Message-ID:
>X-Priority: 3 (Normal)
>X-MSMail-Priority: Normal
>X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
>Importance: Normal
>X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
>Return-Path: [EMAIL PROTECTED]
>X-OriginalArrivalTime: 28 Aug 2002 15:04:59.0458 (UTC)
FILETIME=[471E8220:01C24EA4]
>
>Hi,
>
>I'm using log4j on the Windows platform and many times I notice that
>DailyRollingFileAppender is not able to rename the log file. I get this
>messages on stderr:
>
>log4j:ERROR Failed to rename [c:/path/to/my/file] to
>[c:/path/to/my/file.2002-08-27].
>
>I searched the archives and someone had said it may have something to do
>with multiple threads using a single Logger object. This may in fact be
what
>is causing my problem since I have two threads in one class that are using
>the same Logger.
>
>What should I do to prevent this error from occurring? It is important we
>keep backups of all our log files!
>
>Thanks,
>-shawn
>
>====================================
>Shawn Wilson [[EMAIL PROTECTED]]
>Software Developer, ATMReports.com
>PH: 877-327-0873, FAX: 406-294-5806
>====================================
>
>
>
>--
>To unsubscribe, e-mail:
>For additional commands, e-mail:



MSN Photos is the easiest way to share and print your photos: Click Here


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to