You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by bussa srikanth <sr...@gmail.com> on 2005/09/25 01:07:19 UTC

log4j doubt

Hi

Apache logger has support for logging into files through file appender. But,
if my file is existing on a different location on the "intranet", how should
i specify that network location in the log4j.properties? Also, please point
to the issues that are inherently present with this sort of remote logging.

2. Supposing that we define a new appender for logging onto a n/w file, how
to conditionally instruct logger to log to that appender when a special case
is satisfied? what i know is that when logging has to be done, apache logger
does so dutifully to all the appeneders defined in the log4j.properties file


thanks

Re: Automatically deletion of logs

Posted by James Stauffer <st...@gmail.com>.
Setup an automatic task to delete the old logs (i.e. cron).

On 5/17/04, Taranbir I Singh <ta...@in.ibm.com> wrote:
> Hi All,
>
> I am using "org.apache.log4j.DailyRollingFileAppender".
>
> Is there any way to delete the logs lets say after X days automatically
> through some Appender setting?
>
> if this is not possible in "org.apache.log4j.DailyRollingFileAppender", do
> we have some other appender which supports this, or some other way to
> achieve this task.?
>
> Thank You...
>
> - Taran
>
>


--
James Stauffer
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


Automatically deletion of logs

Posted by Taranbir I Singh <ta...@in.ibm.com>.
Hi All, 

I am using "org.apache.log4j.DailyRollingFileAppender".

Is there any way to delete the logs lets say after X days automatically 
through some Appender setting?

if this is not possible in "org.apache.log4j.DailyRollingFileAppender", do 
we have some other appender which supports this, or some other way to 
achieve this task.?

Thank You...

- Taran

Re: log4j doubt

Posted by Mark Womack <mw...@apache.org>.
1) If you are logging to a file, then the machine where the logging is being 
performed will need access to the volume.  Please be aware that a file 
cannot be shared across multiple log4j instances, only one instance can have 
the file open at one time in the current implementation.  If you do not want 
to have the volume mounted on the machine, then you should look at the other 
appenders that allow "remote" appending like SocketAppender or JMSAppender.

2) Appenders can have "filters" defined for them that will conditionally 
allow logging events through to the appender.  These filters have become 
fairly rich and configurable in the upcoming 1.3 version but there is a very 
usable set in the 1.2.X release and it is very easy to implement your own if 
you need more.

hth,
-Mark

----- Original Message ----- 
From: "bussa srikanth" <sr...@gmail.com>
To: <lo...@logging.apache.org>
Sent: Saturday, September 24, 2005 4:07 PM
Subject: log4j doubt


Hi

Apache logger has support for logging into files through file appender. But,
if my file is existing on a different location on the "intranet", how should
i specify that network location in the log4j.properties? Also, please point
to the issues that are inherently present with this sort of remote logging.

2. Supposing that we define a new appender for logging onto a n/w file, how
to conditionally instruct logger to log to that appender when a special case
is satisfied? what i know is that when logging has to be done, apache logger
does so dutifully to all the appeneders defined in the log4j.properties file


thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org