You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Joshua Preston <jo...@tfcci.com> on 2008/02/06 20:49:13 UTC
Re: DEBUG messages?!
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
>
Re: DEBUG messages?!
Posted by Joshua Preston <jo...@tfcci.com>.
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
> >