On Tue, 10 Apr 2012 18:43:21 +0200
 tommmmmm <tommm...@gmail.com> wrote:
There is no commons-logging-api.jar in my classpath anywhere. There is
commons-logging-1.1.1.jar (there are 2 of them actually).
There is only one log4j in my classpath and it is log4j-1.2.16.jar

Are the jars binary identical?  That is, are they exactly the same size with exactly the same contents?  What size are they?  52k would indicate it is the API jar (bad) by another name, 60k would indicate it really is the complete commons-logging.jar (good).  Why do you have two of them on the classpath anyway?

Are you running on the command line or under an App Server like Tomcat?  If under an app server (provide name/version), do you put all your lib dependencies, including log4j.jar and commons-logging.jar, in WEB-INF/lib or elsewhere?  If elsewhere, please detail.


I highly doubt a problem to be a classpath problem, because then the
logger.debug("some
test message"); would produce nothing, and it works well.


That you can log directly to Log4j is good, but is of no consequence as it relates to HttpClient logging.  The cause of your issue is almost certainly commons-logging, not Log4j, because HttpClient logs directly to commons-logging.  It is the job of commons-logging to direct this logging to Log4j which it is, apparently, failing to do.  The reason I need you to verify that you are not, in fact, using the commons-logging API jar is that it has no Log4j binding and, thus, would explain the lack of Log4j output.  If you are, indeed, using the complete commons-logging.jar, containing Log4j bindings, then we need to look for other causes.  And, BTW, these things are almost **always** classpath/classloading issues.

Tom


Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to