Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 46186 invoked from network); 18 Aug 2006 15:28:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Aug 2006 15:28:26 -0000 Received: (qmail 58842 invoked by uid 500); 18 Aug 2006 15:28:22 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 58819 invoked by uid 500); 18 Aug 2006 15:28:22 -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 58808 invoked by uid 99); 18 Aug 2006 15:28:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Aug 2006 08:28:22 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [62.209.45.166] (HELO mail24-fra-R.bigfish.com) (62.209.45.166) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Aug 2006 08:28:20 -0700 Received: from mail24-fra.bigfish.com (localhost.localdomain [127.0.0.1]) by mail24-fra-R.bigfish.com (Postfix) with ESMTP id A76DF5387A1 for ; Fri, 18 Aug 2006 15:27:57 +0000 (UTC) X-BigFish: V Received: by mail24-fra.bigfish.com (MessageSwitch) id 1155914877127821_9435; Fri, 18 Aug 2006 15:27:57 +0000 (UCT) Received: from mail03.numico.net (unknown [193.67.51.174]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail24-fra.bigfish.com (Postfix) with ESMTP id 171675381A0 for ; Fri, 18 Aug 2006 15:27:57 +0000 (UTC) Received: from nldatams01.intra.numico.net ([172.18.110.28]) by mail03.numico.net with Microsoft SMTPSVC(6.0.3790.1830); Fri, 18 Aug 2006 17:27:25 +0200 Received: from nlwtc1ms03.intra.numico.net ([172.18.234.56]) by nldatams01.intra.numico.net with Microsoft SMTPSVC(6.0.3790.1830); Fri, 18 Aug 2006 17:27:56 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Subject: RE: Log files unlocking MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 18 Aug 2006 17:27:56 +0200 Message-ID: <5D07C30A6AED9D41B15EFF1EB1D04DCB07335E@nlwtc1ms03.intra.numico.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Log files unlocking Thread-Index: AcbC1Y06ntXmCvhrSQC29RMdg1wT6AABOgWA From: "Blok, Eelke" To: "Log4J Users List" X-OriginalArrivalTime: 18 Aug 2006 15:27:56.0591 (UTC) FILETIME=[E15793F0:01C6C2DA] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Can you not delete any old log files prior to configuring log4j? I.e., don't try deleting the current run's logs at the end of your program, but delete the previous run's logs at the start of your program. -----Original Message----- From: Dmitry Kan [mailto:dmitry.kan@gmail.com]=20 Sent: vrijdag 18 augustus 2006 16:49 To: Log4J Users List Subject: Re: Log files unlocking I must remove the log file for both reasons: it is being zipped along with the contents of it's folder and the mentioned class ( with main() ) is invoked many times per week. In practice the latter reason refers to such a state when we could have many log files produced during prev. class usage, since the MaxFileSize is set to 1000KB. And in this case all the 'crap' log files of prev. session will also be zipped. Of course, I can try to track all the logs filenames produced during cur. session and zip them separately. But the issue is that, in worst case, the folder will be just full of log files. On 18/08/06, James Stauffer wrote: > > If you could provide the reason that you want to do this we might have > better suggestions. > > On 8/18/06, Dmitry Kan wrote: > > The log file is being removed with Java at the end of a public (not > static) > > method of the class (with Log object configured). I invoke this=20 > > method > in > > main() of another class. > > > > Does it matter whether the LogManager.shutdown() is called in a=20 > > static context (static method)? > > > > On 18/08/06, James Stauffer wrote: > > > > > > How (with Java or external?) and when (while program is running?)=20 > > > are you trying to remove it? > > > > > > On 8/18/06, Dmitry Kan wrote: > > > > Hi there! > > > > > > > > I've got a small problem with unlocking log files after all > logging's > > > done. > > > > I've configured the Log object for my class using > PropertyConfigurator > > > so > > > > that all loggings go directly to a certain log file. The issue=20 > > > > is > that > > > it > > > > turns out to be rather tricky task to unlock that file (I need=20 > > > > to > remove > > > it > > > > after the app's done its work). I've just tried=20 > > > > LogManager.shutdown > (); > > > but > > > > it hasn't worked. Any ideas are appreciated. > > > > > > > > -- > > > > best wishes, > > > > Dmitry Kan > > > > > > > > > > > > > > > > > -- > > > James Stauffer http://www.geocities.com/stauffer_james/ > > > Are you good? Take the test at http://www.livingwaters.com/good/ > > > > > > ------------------------------------------------------------------ > > > --- > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > > > For additional commands, e-mail: log4j-user-help@logging.apache.org > > > > > > > > > > > > -- > > best wishes, > > Dmitry Kan > > > > > > > -- > James Stauffer http://www.geocities.com/stauffer_james/ > Are you good? Take the test at http://www.livingwaters.com/good/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > For additional commands, e-mail: log4j-user-help@logging.apache.org > > --=20 best wishes, Dmitry Kan PRIVACY: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or priviliged material. Any review, retransmission, dissemination or other use of this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org