Howdy, Personally, I have one log4j configuration file for development, testing, and production. The file contains several tokens (ant tokens, @something@) which are filled in by the ant script that runs the test or deploys the app to staging/production. The build.properties file contains the actual value, e.g. the log file path.
Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Wendy Smoak [mailto:[EMAIL PROTECTED] >Sent: Tuesday, December 23, 2003 2:02 PM >To: [EMAIL PROTECTED] >Subject: Configuring Log4j for testing vs. development vs. deployment > > >I figured out that this problem: >[junit] log4j:ERROR setFile(null,true) call failed. >[junit] java.io.FileNotFoundException: \opt\hpws\tomcat\logs\coldev.log >(The system cannot find the path specified) > >Is caused by log4j.properties saying: ># Configure the name of the logout for the daily appender >log4j.appender.daily.File=/opt/hpws/tomcat/logs/coldev.log > >That path belongs on the HPUX web server. In an attempt to avoid >changing log4j.properties for deployment, I created a >c:\opt\hpws\tomcat\logs directory on my Windows development machine. >But now that .properties file doesn't work for me when I run junit tests >from the mapped network drive "G" where the source code lives. > >So... Do you have a separate log4j.properties for running tests? How do >you handle configuring log4j for tests? (In the most automated way >possible!) > >Thank you, >-- >Wendy Smoak >Application Systems Analyst, Sr. >ASU IA Information Resources Management > > > >--------------------------------------------------------------------- >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]
