On Wed, Apr 29, 2009 at 02:33:38AM -0400, V S P wrote:
> Hello
> 
> wanted to ask if a combination of
> http-components core 4.0
> commons-logging-1.1
> log4j-1.2.13
> 
> is supposed to be working to produce DEBUG logging
> 
> Do I possibly need to pass any special args
> to things like  HttpRequestExecutor?
> 
> My configuration file is
> -----------------
> log4j.rootLogger=DEBUG,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.component=DEBUG,stdout
> log4j.logger.httpclient.wire=DEBUG,stdout
> log4j.logger.org.apache.commons.httpclient=DEBUG,stdout
> log4j.logger.org.openxml4j=DEBUG,stdout
> -----------------
> 
> I load it in main with
> PropertyConfigurator.configure(args[0]);
> but also specify it with -Dlog4j.configuration
> just in case -- as I am at a loss now.
> 
> 
> I have made sure with 
> java -Dorg.apache.commons.logging.diagnostics.dest=STDOUT
> that my log4j installation is detected.
> 
> 
> My logging messages are displayed,
> also
> openxml4j messages are displayed too (I am using that package as well)
> DEBUG [org.openxml4j] Save core properties part
> DEBUG [org.openxml4j] Save core properties part
> 
> My program is command line (not executed within a app server)
> It is pretty much a cut and paste from the ElementalHttpGet.java
> 
> not even a single line is coming out frm httpcomponents 
> 
> thank you in advance for any pointers
> Vlad
> -- 
>   V S P
>   [email protected]
> 

Vlad,

HttpCore does not depend on a particular logging toolkit and therefore unable 
to do any kind of loggingout of the box. One can always add logging 
capabilities by decorating core classes as demonstrated below:

http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java

Hope this helps

Oleg

> -- 
> http://www.fastmail.fm - Or how I learned to stop worrying and
>                           love email again
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to