Re: Log4J doesn't work at all

2012-04-12 Thread ceki
On 11.04.2012 19:55, tomm wrote: [snip] I added/removed jars one by one of course it had to be the last one. When I removed /home/min/ucng/javaLibs/selenium-server-standalone-2.20.0.jar It started to work. However... I need selenium - it's my main browser. So when I added it back S

Re: Log4J doesn't work at all

2012-04-12 Thread tommmmmm
On 11 April 2012 23:19, Jacob Kjome wrote: > > Selenium depends upon SLF4J. You may recall that I mentioned SLF4J in a > previous email. In appears Selenium includes it's own SLF4J binding. It > seems rather silly to me that they would include this as part of their main > library rather than a

Re: Log4J doesn't work at all

2012-04-11 Thread Douglas E Wegscheid
woho! slf4j is in there! you have 2 copies of a slf4j binding loaded, one in the slf4j jar, one in the selenium jar. slf4j docs say it should use the first one found, which means slf should be binding to log4j. slf4j may be catching all the common-logging messages. You have a mess here: multip

Re: Log4J doesn't work at all

2012-04-11 Thread Jacob Kjome
Selenium depends upon SLF4J.  You may recall that I mentioned SLF4J in a previous email.  In appears Selenium includes it's own SLF4J binding.  It seems rather silly to me that they would include this as part of their main library rather than as a separate, optional, jar. I suggest you conta

Re: Log4J doesn't work at all

2012-04-11 Thread tommmmmm
On 11 April 2012 18:45, tomm wrote: > I used the old project I had in my Projects list. And it works there > flawlessly. > > For easier readability here are the results: > > Log4j configuration debug output in working project: > **Start of LogManager static initializer > *** configurationOpti

Re: Log4J doesn't work at all

2012-04-11 Thread tommmmmm
I used the old project I had in my Projects list. And it works there flawlessly. For easier readability here are the results: Log4j configuration debug output in working project: **Start of LogManager static initializer *** configurationOptionStr=null ** End of LogManager static initializer DEBUG

Re: Log4J doesn't work at all

2012-04-11 Thread Douglas E Wegscheid
tomm wrote on 04/11/2012 11:55:59 AM: > I got something pretty much the same. try making a new project with >>exactly<< what I posted. Then we'll know if it's your environment, or that specific project

Re: Log4J doesn't work at all

2012-04-11 Thread Douglas E Wegscheid
tomm wrote on 04/11/2012 11:55:59 AM: > I also > added: org.apache.commons.logging.Log=org.apache.commons.logging. > impl.Log4JLogger > to commons-logging.properties to point commons-logging to log4j. Didn't > help either. > > More ideas? Have you tried creating a new project with just thes

Re: Log4J doesn't work at all

2012-04-11 Thread tommmmmm
2012/4/11 Douglas E Wegscheid > > > I made a new project in Eclipse, added all the jar files in > httpcomponents-client-4.1.3 GA to a /lib folder, added log4j-1.2.16.jar to > the same folder, put all the jars in that folder on my classpath, added > these two files to src folder: > > There was a di

Re: Log4J doesn't work at all

2012-04-11 Thread Douglas E Wegscheid
tomm wrote on 04/11/2012 01:28:23 AM: > > > > You indicated that you were going to grab a fresh commons-logging jar and > > use it. Did you, or did that step get lost in the shuffle? > > > I did. Did not help. Fyi, it was also 60KB+ I made a new project in Eclipse, added all the jar files

Re: Log4J doesn't work at all

2012-04-11 Thread tommmmmm
I used System.setProperty("log4j.defaultInitOverride", "true"); So I can get clean loading: log4j: Default initialization of overridden by log4j.defaultInitOverrideproperty. log4j: Parsing for [root] with value=[DEBUG, stdout]. log4j: Level token is [DEBUG]. log4j: Category root set to DEBUG log4j

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
> > the log4j properties that you originally posted has nothing in it about > jobManager; the output indicates that the one getting used does have > settings for jobManager. Jacob has asked a question that may or may not be > salient: are you sure the config file that is being loaded is the one you

Re: Log4J doesn't work at all

2012-04-10 Thread Douglas E Wegscheid
tomm wrote on 04/10/2012 05:06:20 PM: > > The one odd thing I see is that there is a logger named "jobManager" that > > is configured. I don't see that in the log4 config you posted in a > > previous response (see below). Are you sure the config file that is being > > loaded is the one yo

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
On 10 April 2012 22:30, Jacob Kjome wrote: > > In your other email you say... > > > Running command line. From within NetBeans. No fancy stuff. >> > > Never discount the complexity of an IDE and how it forks JVMs and/or > performs idiosyncratic classloading. > > I load/run only 1 JVM at a time.

Re: Log4J doesn't work at all

2012-04-10 Thread Jacob Kjome
In your other email you say... Running command line. From within NetBeans. No fancy stuff. Never discount the complexity of an IDE and how it forks JVMs and/or performs idiosyncratic classloading. In any case, your test below is invalid in this context.  You claimed, in an earlier respons

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
My debug for log4j: log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@56e88e24. log4j: Trying to find [log4j.xml] using sun.misc.Launcher$AppClassLoader@56e88e24 class loader. log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource(). log4j:

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
On 10 April 2012 19:25, Jacob Kjome 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 an

Re: Log4J doesn't work at all

2012-04-10 Thread Jacob Kjome
On Tue, 10 Apr 2012 19:23:18 +0200  tomm wrote:    System.setProperty("log4j.**logger.org.apache.http.client"**, "DEBUG"); But HttpClient's instructions say to do (again, read the instructions more closely)...   System.setProperty("org.**apache.commons.logging.** simplelog.log.org.apa

Re: Log4J doesn't work at all

2012-04-10 Thread Jacob Kjome
On Tue, 10 Apr 2012 18:43:21 +0200  tomm 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 t

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
> > > System.setProperty("log4j.**logger.org.apache.http.client"**, "DEBUG"); > > But HttpClient's instructions say to do (again, read the instructions more > closely)... > System.setProperty("org.**apache.commons.logging.** > simplelog.log.org.apache.http.**wire", "DEBUG"); > > For the reco

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
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 I highly doubt a problem to be a classpath problem, because then the logger.debug("some test message")

Re: Log4J doesn't work at all

2012-04-10 Thread Jacob Kjome
But I don't want to use commons-logging. I want to use log4j. You are missing the point.  **You** want to use Log4j.  That's fine.  But HttpClient doesn't directly use Log4j.  It directly uses commons-logging, which is a Logger adapter that supports various logging implementations, one of whi

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
On 10 April 2012 15:34, Jacob Kjome wrote: > > That system property stuff only applies to commons-logging, not Log4j. > Look more closely at the instructions [1]. > > BTW, are you using commons-logging-api.jar? If so, that's the problem. > You need commons-logging.jar. See the commons-logging r

Re: Log4J doesn't work at all

2012-04-10 Thread Jacob Kjome
That system property stuff only applies to commons-logging, not Log4j.  Look more closely at the instructions [1]. BTW, are you using commons-logging-api.jar?  If so, that's the problem.  You need commons-logging.jar.  See the commons-logging release notes [2]. [1] http://hc.apache.org/http

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
I did this for a test: logger.debug("some test message"); // <- DOES get printed. my_code_here_based_on_HttpClient; // <- should produce tons of logging output logger.debug("some test message"); // <- DOES get printed. So why the middle part doesn't produce any output? Just to recall I am using lo

Re: Log4J doesn't work at all

2012-04-10 Thread tommmmmm
In reply to the questions: By Michael Erskine 1. I know this might sound daft but is your class actually trying to log anything? 2. Any luck with Log4J for a simple application? 3. Are you using HttpClient at the server side under Tomcat or as a standalone client? 1. Yes it does. I use: PropertyC

Re: Log4J doesn't work at all

2012-04-10 Thread Gary Gregory
See http://logging.apache.org/log4j/1.2/manual.html under "Default Initialization Procedure" Gary On Tue, Apr 10, 2012 at 6:23 AM, tomm wrote: > From: http://hc.apache.org/httpcomponents-client-ga/logging.html > I copy pasted > > log4j.rootLogger=INFO, stdout > > log4j.appender.stdout=org.a

Re: Log4J doesn't work at all

2012-04-10 Thread Michael Erskine
On 10 April 2012 12:27, Michael Erskine wrote: > I know this might sound daft but is your class actually trying to log > anything? OK, I see where you're coming from: http://hc.apache.org/httpcomponents-client-ga/logging.html ...and you would expect the HttpClient to log to the console. I'm not

Re: Log4J doesn't work at all

2012-04-10 Thread Michael Erskine
I know this might sound daft but is your class actually trying to log anything? - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org

Log4J doesn't work at all

2012-04-10 Thread tommmmmm
From: http://hc.apache.org/httpcomponents-client-ga/logging.html I copy pasted log4j.rootLogger=INFO, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n log4j.logge