I've tried that. Thanks for your suggestion though.
"Philip Denno" <[EMAIL PROTECTED]> 03/02/2006 04:48 PM Please respond to "Log4J Users List" <[email protected]> To "Log4J Users List" <[email protected]> cc Subject RE: log4j...help. This has been discussed before so search the mail archive and you should find plenty. One solution would be if you have access to VM start then set a system property using the -D mechanism. Then in your config file reference the system property using "${<property you set>}/perf.log". (I think the syntax is correct, but check the archive). Cheers, Philip. -----Original Message----- From: Billy W. Talton [mailto:[EMAIL PROTECTED] Sent: Thursday, March 02, 2006 2:19 PM To: [email protected] Subject: log4j...help. All, I haven't used log4j a whole lot. Having noticed that logging in not particularly a strongsuit in the applications at my job, I decided that I would implement this industry-standard in my next project. I downloaded the latest version, installed and configured it rather easily and I was off and running.. i thought. I've been stumped by this one problem... I've been going nuts trying to figure out how to output to a file/directory in my web application. I'm able to go to database and console just fine. A few other Appenders worked as well. As I've found, log4j prints directly to my WSAD root install directory. This is a problem for me since I share a server with other teams and applications. I could create a NAS share but that creates portability issues. This has to be simple but I'm Googlestumped. Here's my log file. Any ideas? ___ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="USER_LOG" class="org.apache.log4j.ConsoleAppender" > <param name="Threshold" value="debug" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m\n" /> </layout> </appender> <appender name="PERF_LOG" class="org.apache.log4j.FileAppender"> <param name="File" value="perf.log" /> <param name="Threshold" value="info" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p %c{2} - %m\n" /> </layout> </appender> <appender name="ROLE_LOG" class= "org.apache.log4j.RollingFileAppender"> <param name="File" value="es_edi.log" /> <param name="MaxBackupIndex" value="10" /> <param name="MaxFileSize" value="1000KB" /> <param name="Threshold" value="debug" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%d] %t %c %-5p - %m%n" /> </layout> </appender> <logger name="com.xxx.xxx"> <level value="DEBUG" /> <appender-ref ref="PERF_LOG" /> <appender-ref ref="USER_LOG" /> <appender-ref ref="ROLE_LOG" /> </logger> <root> <priority value="debug" /> <appender-ref ref="USER_LOG" /> </root> </log4j:configuration> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
