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 Ch...@mail.sprint.com on 2001/08/23 21:14:34 UTC

Newbie Question: Relative Path Name for Appender File

First, Log4J is excellent. Thanks!

In the mailing list archives, I saw the suggestion below on how to 
specify a relative path for appender log files. How/where is the 
"configDir = /usr/local/my_project/prod/logs" setting specified? I hope 
this question isn't too stupid. Thanks!

Chuck 






configDir = /usr/local/my_project/prod/logs

log4j.category.my_category=INFO, MY_Appender1, MY_Appender2, 
MY_Appender3,
MY_Appender4, MY_Appender5, MY_Appender6, MY_Appender7
...
log4j.appender.MY_Appender1.File=${configDir}/trace1.log
...
log4j.appender.MY_Appender2.File=${configDir}/trace2.log
...
log4j.appender.MY_Appender3.File=${configDir}/trace3.log
...
log4j.appender.MY_Appender4.File=${configDir}/trace4.log
...
log4j.appender.MY_Appender5.File=${configDir}/trace5.log
...
log4j.appender.MY_Appender6.File=${configDir}/trace6.log
...
log4j.appender.MY_Appender7.File=${configDir}/trace7.log

Log4j supports variable substitution in config files. Hope this helps. 
Ceki


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