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 Wendy Smoak <We...@asu.edu> on 2003/07/04 00:42:07 UTC

RE: Specifying log file location when moving from development to production

Yoav wrote:
> Another approach is to use an environment variable, e.g. 
> log4j.appender.blah.File=$CATALINA_HOME/logs/myFile.txt

I have:
log4j.appender.daily.File=$CATALINA_HOME/logs/bentest.log

This isn't working.  I have CATALINA_HOME set [on Windows] 

g:\irm\sharedsource\benweb>echo %CATALINA_HOME%
c:\jakarta\jakarta-tomcat-4.1.24-LE-jdk14

But when I install my webapp, in the console I see:

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: $CATALINA_HOME\logs\bentest.log (The system
canno
t find the path specified)

I also tried ${CATALINA_HOME} with these results:
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: \logs\bentest.log (The system cannot find the
pat
h specified)

Is there something special I have to do to make it aware of environment
variables?  Or does anyone see what I'm doing wrong?

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM