logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Stauffer" <stauffer.ja...@gmail.com>
Subject Re: Not able to DELETE Log Files
Date Mon, 13 Aug 2007 15:25:43 GMT
When you are using the central server, change your config to not use
the FileAppender.  That won't allow you to delete the file but at
least it will be empty.

On 8/13/07, rajashekhar v <rajshekhar.vdas@gmail.com> wrote:
> Yes the file is open by the log4j. Is there any alternatives for this such
> as writing empty data to the file. Or any other way to achieve my
> requirement.
>
> regards,
> Rajshekhar.V
>
> On 8/13/07, James Stauffer <stauffer.james@gmail.com> wrote:
> >
> > The file probably can't be deleted because log4j has it open so that
> > it can write to it.
> >
> > On 8/13/07, rajashekhar v <rajshekhar.vdas@gmail.com> wrote:
> > > Hi All,
> > >
> > > I'm implementing Logger for Distributed System using Log4j. I have 4
> > > different servers and each server is having the local Logger. Apart from
> > the
> > > local logger there will be an centralized logger in one server.
> > > Usually the messages are logged to the centralized logger only. When
> > central
> > > server is down the messages are logged to the local server.
> > > When the Centralized server is up the locally logged files(messages)
> > need to
> > > be logged to the Centralized server and local log files need to be
> > > deleted. When
> > > i try to delete the log files programmtically when the server is running
> > its
> > > giving exception like access denied.
> > > I'm using XMLLayout Pattern and Tomcat as Application Server.
> > >
> > > Can any one help me in this case,
> > >
> > > regards,
> > > Rajashekhar V
> > >
> >
> >
> > --
> > James A. N. 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
> >
> >
>
>
> --
> Rajashekhar V
>


-- 
James A. N. 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


Mime
View raw message