hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Preston <joshua.pres...@tfcci.com>
Subject Re: DEBUG messages?!
Date Wed, 06 Feb 2008 20:01:11 GMT
Michael,

I should clarify... Wire.java does not use the CATEGORY feature of
log4j.  Instead, it's creating it's own logger, ie:


        public static Wire HEADER_WIRE = new
        Wire(LogFactory.getLog("httpclient.wire.header"));
        public static Wire CONTENT_WIRE = new
        Wire(LogFactory.getLog("httpclient.wire.content"));
        

This basically means that you must use LOGGER, not CATEGORY in your
log4j settings. Before, I listed my log4j.properties file, you use XML.
Yours should probably appear like:

...

        <logger name="httpclient.wire">
          <level value="info"/> 
        </logger>

...

However, httpclient.wire.content and httpclient.wire.header appear to
allow you to hide the content, but show debug messages for the headers
if needed or visa versa.  Just a thought.

Thanks!


On Wed, 2008-02-06 at 14:49 -0500, Joshua Preston wrote:

> Michael,
> 
> I ran into this with Spring also and I got rid of them by adding:
> 
> log4j.logger.httpclient.wire=INFO
> 
> to my log4j.properties file.
> 
> Hope that helps.
> 
> Thanks!
> 
> 
> 
> On Mon, 2008-01-28 at 10:53 -0500, Michael Prichard wrote:
> 
> > I am running HTTPClient inside of a spring framework and I am trying  
> > to figure out how to shut off the Wire.java DEBUG messages.
> > 
> > I am getting a million of these:
> > 
> > main 2008-01-28 15:49:28,125 DEBUG {Wire.java:83} - << "[\r]"
> > main 2008-01-28 15:49:28,135 DEBUG {Wire.java:69} - << "[\n]"
> > main 2008-01-28 15:49:28,136 DEBUG {Wire.java:83} - << "[\r]"
> > main 2008-01-28 15:49:28,136 DEBUG {Wire.java:69} - << "[\n]
> > 
> > I put this into my log4j/xml file....and still no luck.
> > 
> > 	<category name="org.apache.commons.httpclient.wire" >
> > 		<priority value="INFO"/>
> > 	</category>
> > 	<category name="org.apache.commons.httpclient.wire.header" >
> > 		<priority value="INFO"/>
> > 	</category>
> > 	<category name="org.apache.commons.httpclient.wire.content" >
> > 		<priority value="INFO"/>
> > 	</category>
> > 
> > Is there something I am missing?
> > 
> > Thanks!
> > Michael
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> > 

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