logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: logfile name - can it be parameterized in the props file?
Date Mon, 17 May 2004 23:37:18 GMT

log4j.appender.logfile.File=${myrun.log.file.name}

And then in java code before configuring Log4j, set a system property with 
the key "myrun.log.file.name" and provide the path you want.

Jake

At 11:35 AM 5/17/2004 -0400, you wrote:
>In the log4j properties file, to set the name of the log, I have
>     log4j.appender.logfile.File=myrun.log
>
>However, we would like to run the server multiple times
>(not once w/multiple threads)
>and have each instance of the server use a different
>logfile name - for example, with the PID in the name,
>or a date+time - something unique for each instance.
>
>Is there a way in the properties file to indicate
>such a parameter for the logfile name?
>
>I would rather have one properties file for multiple
>instances that multiple properties files. (or code change)
>
>thanks for any illumination you can provide on this issue :)
>Rebecca
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org


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