Sounds nice. However, the issue of folder 'crapping' still remains in case
the class won't be invoked anymore :)

Anyway, thanks. I might consider this as an approach unless desired
unlocking won't be reached.

On 18/08/06, Blok, Eelke <[EMAIL PROTECTED]> wrote:

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:[EMAIL PROTECTED]
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 <[EMAIL PROTECTED]> wrote:
>
> If you could provide the reason that you want to do this we might have

> better suggestions.
>
> On 8/18/06, Dmitry Kan <[EMAIL PROTECTED]> 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
> > method
> in
> > main() of another class.
> >
> > Does it matter whether the LogManager.shutdown() is called in a
> > static context (static method)?
> >
> > On 18/08/06, James Stauffer <[EMAIL PROTECTED]> wrote:
> > >
> > > How (with Java or external?) and when (while program is running?)
> > > are you trying to remove it?
> > >
> > > On 8/18/06, Dmitry Kan <[EMAIL PROTECTED]> 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
> > > > is
> that
> > > it
> > > > turns out to be rather tricky task to unlock that file (I need
> > > > to
> remove
> > > it
> > > > after the app's done its work). I've just tried
> > > > 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: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
best wishes,
Dmitry Kan

Reply via email to