On Tue, Apr 10, 2012 at 02:22:10PM +0200, tommmmmm wrote: > > Sort out your local mess. HttpClient DOES NOT enforce any particular > > logging configuration. It uses Commons Logging API. You cannot blame Log4j > > configuration issues on HttpClient. > > > > Oleg > > > > > There is no local mess, because I am not using anything fancy. In fact I am > NOT using anything at all besides that one tiny logging + I am only using > the given example from: > http://hc.apache.org/httpcomponents-client-ga/logging.html This: > > 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.logger.org.apache.http=DEBUG > log4j.logger.org.apache.http.wire=ERROR > > And I changed INFO and ERROR to DEBUG, just in case. > > ---------- > So, to sum it up, there are 5 lines of code (1. Initializing HttpClient 2. > Initializing HttpGet 3. Initializing simple handler 4. Executing method 5. > Printing output), and only the given example from the webpage (that > theoretically should work off the bat). So, no mess. Not at all.
As I said ealier HttpClient does not directly depend on Log4J. It uses Commons Logging API as a logging abstraction layer. If Commons Logging picked up another backend (simple, java.util.Logging, etc) for some reason and not Log4J you may never see a single logging entry produced by HttpClient printed out to the console. Once again, this issue has nothing to do with HttpClient. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
