logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tommmmmm <tommm...@gmail.com>
Subject Re: Log4J doesn't work at all
Date Tue, 10 Apr 2012 17:37:54 GMT
On 10 April 2012 19:25, Jacob Kjome <hoju@visi.com> wrote:

> On Tue, 10 Apr 2012 18:43:21 +0200
> Are the jars binary identical?  That is, are they exactly the same size
> with exactly the same contents?


One is 60.7 KB and one is 60.8 KB


> 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?
>
>
Because when I add a jar that has it's own dependencies I add it via Tools
-> Libraries -> Add new. This way my project (right click) -> Properties ->
Libraries looks way cleaner. It only shows main jars and not absolutely all
jars.


> 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.
>
>
Running command line. From within NetBeans. No fancy stuff.


>
> 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
>

 As far as classloading goes, on the libraries list, I put log4j at the top
and HttpClient right after it. The other jar that was using commons-logging
('pbapi.jar' - unrelated) I put on bottom.

I will try to download commons-logging from main website and point
HttpClient to it manually.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message