I ran into this just this morning. Why not use a variable for the File attribute? Something like this:
log4j.appender.daily.File=${catalina.home}/logs/bentest.log Or even better, for maximum portability: log4j.appender.daily.File=${catalina.home}{$file.separator}logs{$file.separa tor}bentest.log Cheers, Rob Rob Cash Technical Architect & Application Developer Nortel Networks (http://www.nortelnetworks.com) Information Services -----Original Message----- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2003 1:38 PM To: [EMAIL PROTECTED] Subject: Specifying log file location when moving from development to prod uction I use Log4j behind Commons Logging in a Struts app running under Tomcat. I'm happy with everything except one minor irritation when I deploy a new version of my webapp. In log4j.properties, I have: # Configure the name of the logout for the daily appender # default location when used with Tomcat on Windows # is is /path/to/tomcat/bin, so back up one & go into logs #log4j.appender.daily.File=/opt/hpws/tomcat/logs/bentest.log log4j.appender.daily.File=../logs/bentest.log I have to remember to swap which line is commented out when I move the app to production. I forget where the log file wants to go naturally (with no path) on Unix, but it wasn't the same place as on Windows. Then if you start Tomcat as an NT service as a coworker of mine does, the log file wants to go somewhere else entirely, so the relative path doesn't work. Has anyone got a way to deal with this programmatically, either one setting that will work for both Windows and Unix, or something that Ant can do, or... ? -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM