> Howdy, Your problem is not log4j, it's commons-logging, which is nearly
always the culprit. The issue arises if log4j is in a classloader below
commons-logging, so
> commons-logging doesn't know log4j is there. You're configuring log4j OK,
and if you used a log4j Logger rather than a commons-logging Log, you'd see
expected
> behavior. But you're using a commons-logging Log, which uses the
commons-logging configuration, which is tied to your server and outputs to
the console. Yoav
> Shapira Millennium ChemInformatics
Shapira,
Thanks for the advice. I tried using Log4J directly by one of my classes
and, like you said, it worked. However, I wanted to stick with commons
logging since this is (supposedly) the most flexible logging solution.
Therefore, I tried sticking log4j.jar into ${TOMCAT_HOME}/common/lib and
log4j.xml into ${TOMCAT_HOME}/common/classes. This worked for Tomcat classes
but not my own (my log output was still going to stdout). This had me
stumped.
After further stuffing around, one of my work collegues mentioned he'd
gotten around this problem by including commons-logging.jar and
commons-logging-api.jar in his web app. I tried this and it worked. I then
removed commons-logging-api.jar from my web app and it still worked.
In a way this all kind of makes sense - my web app has its own commons
logging package which finds the log4j package and the configuration.
However, I am surprised that this was all necessary. I am also surprised
that it is (I think) undocumented.
Anyways, thanks for your help.
Regards,
Kent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]