>> // this proves log4j.properties is in the path
> > System.out.println("Simple: " + log4jfile + " exists: "
+ l.exists());
No, actually this proves next to nothing. What you've shown is that
a file exists in the directory that you started the JVM from. It
does not give a
Jacob,
Thanks for you help. Unfortunately your changes did not solve the problem.
Here is my updated log4j.properties, with your suggestions in place:
log4j.rootLogger=WARN, SO1
log4j.logger.tb.test=DEBUG, SO1, RF1
log4j.logger.org.apache.commons.httpclient.wire=WARN, SO1, RF1
#
2 things:
1. You should *always* define the root logger, such as...
log4j.rootLogger=WARN, SomeAppender
2. Your other loggers need to be prefixed by "log4j.logger.", such as...
log4j.logger.tb.test=DEBUG, SO1, RF1
log4j.logger.org.apache.commons.httpclient.wire=WARN, SO1, RF1
Jake
At 04:
Usually putting log4j.properties in the classpath is enough to properly
initialize it. In this case, even though log4j.properties is provably in my
classpath, it's not initializing correctly.
Here is the code:
package tb.test;
import org.apache.log4j.Logger;
import java.io.File;