Howdy, I guess you're assuming log4j automatically reads environment properties into an env. prefix scheme like Ant? ;) Try just environment variable, e.g. $CATALINA_HOME or ${CATALINA_HOME}.
Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Praveen Alavilli [mailto:[EMAIL PROTECTED] >Sent: Friday, November 14, 2003 2:22 PM >To: Log4J Users List >Subject: how to use env vars in log4j.properties file > >Hi, >I am trying to configure a DailyRollingFileAppender for my test app. >I want to set the log file to be in my server's (tomcat) log dir along >with other log files. But if set the File path as > >log4j.appender.MyappLog.File=${env.CATALINA_HOME}/logs/myapp.log > >it throws this error: > >log4j: setFile called: /logs/myapp.log, true >log4j:ERROR setFile(null,true) call failed. >java.io.FileNotFoundException: /logs/myapp.log (No such file or directory) > >Is there any ther way to get this working apart from hard coding the >file name/dir ? > >thanks in advance >Praveen > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]