As with all java processes, a relative file path will be interpreted as relative from the current working directory (i.e., the directory from which the process was created). However, that is not always the directory you were in when you ran the command (weblogic, for example, CDs to its domain-specific directory before launching the server).
Don't have much experience with JRun, so I cannot say for sure how it works. However, there is an option to use variable replacement within the log4j config file. The basic jist would be to define a java System variable (either using a -D option on the command line used to start the process, or explicitly calling System.setProperty() in your code) and then referencing that variable in the config. So for example: 1) start your process with java -Dlog4j.log.dir=<your path to "jrun/logs"> 2) use ${log4j.log.dir} where you want to define the relative path; like ${log4j.log.dir}/myLogFile.log Just FYI, if you decide to use this approach and try to use the System.setProperty call, make sure the System.setProperty call is done before log4j gets configured. HTH ----- Original Message ----- From: "Steve Cohen" <[EMAIL PROTECTED]> To: "Log4J Users List" <[EMAIL PROTECTED]> Sent: Wednesday, February 19, 2003 5:19 PM Subject: controlling the location of log files Is there a way, without writing system-dependent absolute paths in the log4j configuration file to control where log4j puts the logs? In other words, to what is a relative path passed to log4j relative? Is this entirely container-dependent? If so, can someone with experience with log4j under JRun4 tell me how (system-independently) to make the logfile come up in the jrun/logs directory? ----------------------------------------------- Steve Cohen Sr. Software Engineer Sportvision Inc. [EMAIL PROTECTED] http://www.sportvision.com Please note: As a result of the merger of Ignite Sports and Sportvision, my email address has changed to [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]