This content has been marked as final.
Show 3 replies
-
1. Re: Classic log4j /log/boot.log java.io.FileNotFoundExceptio
starksm64 Apr 23, 2005 9:38 AM (in response to dlmiles)[starksm@banshee9100 bin]$ jar -tf run.jar | grep log4j log4j-debug.properties log4j-trace.properties log4j.properties [starksm@banshee9100 tmp]$ cat log4j.properties ### ====================================================================== ### ## ## ## JBoss Bootstrap Log4j Configuration ## ## ## ### ====================================================================== ### ### $Id: log4j.properties,v 1.3 2002/07/12 21:52:36 user57 Exp $ ### log4j.rootCategory=DEBUG, FILE, CONSOLE ### A bootstrap file appender log4j.appender.FILE=org.jboss.logging.appender.FileAppender log4j.appender.FILE.File=${jboss.server.home.dir}/log/boot.log log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n log4j.appender.FILE.Append=false log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=INFO log4j.appender.CONSOLE.Target=System.out log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-
2. Re: Classic log4j /log/boot.log java.io.FileNotFoundExceptio
dlmiles Apr 23, 2005 12:42 PM (in response to dlmiles)"scott.stark@jboss.org" wrote:
log4j.appender.FILE.File=${jboss.server.home.dir}/log/boot.log
Thanks for the reply. I really dont understand how .properties files work, but here is what I did to correct the problem.
I obviously dont want to edit run.jar as that will affect everything (not just my TestClient) and its only my test client with a problem.
I extracted the log4j.properties edited to how I wanted, changing just the following line:
log4j.appender.FILE.File=/tmp/java_client.log
Then created a JAR from it called $JBOSS_HOME/bin/run-client-test.jar
Then I have created an execution (Run/Debug) context within Eclipse (Run->Run) that allows me to add as the first library my newly created JAR (just above run.jar). So that its in the classpath when my TestClient gets run.
Now I get a useful log file and no error :). -
3. Re: Classic log4j /log/boot.log java.io.FileNotFoundExceptio
starksm64 Apr 23, 2005 12:49 PM (in response to dlmiles)Use -Dlog4j.configuration=/path_to_log4j_properties in the JAVA_OPTS to point to an external bootstrap configuration. See the log4j site for the details.