logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alistair Hopkins" <alist...@berthengron.co.uk>
Subject RE: Location of log files
Date Fri, 05 Jan 2001 15:32:43 GMT
I'll look forward to it.
Thanks,

Alistair

-----Original Message-----
From: Ceki Gulcu [mailto:cgu@urbanet.ch]
Sent: Friday, January 05, 2001 3:22 PM
To: LOG4J Users Mailing List
Subject: Re: Location of log files


At 14:38 05.01.2001 +0000, you wrote:
>Just spent the morning implementing log4j, a lovely thing.  Why didn't I
>start using it 6 months ago?
>
>Just one question:
>
>Is there any way I can set in code a root directory for log files, so that
>the log4j.properties becomes more portable?
>
>i.e.: instead of
>
>log4j.appender.statsLog.File=/home/appserver/tomcat/logs/stats.log
>
>i should be able to use
>
>log4j.appender.statsLog.File=stats.log
>
>then use code when I use the PropertyConfigurator to set the root
directory?
>
>Thanks,
>
>Alistair.

In log4j version 1.0, it will be possible to say:

mydir=/home/appserver/tomcat/logs
log4j.appender.statsLog.File=${mydir}/stats.log
log4j.appender.xyzLog.File=${mydir}/xyz.log

Moreover, you will be able to set the mydir variable either in the config
file or as a system property. Regards, Ceki


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



Mime
View raw message