Wire Logging

View: New views
5 Messages — Rating Filter:   Alert me  

Wire Logging

by Danny Gallagher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Using 3.1

 

I cannot seem to get wire logging to produce anything in my log.

 

Here is the code:

 

FileHandler defaultHandler = new FileHandler(path + "BBD%u.log", 50000,
1, true);

Logger.getLogger("").addHandler(defaultHandler);

Logger.getLogger("org.apache.commons.httpclient").setLevel(Level.ALL);

 

Logger.getLogger("org.apache.http.wire.level").setLevel(Level.ALL);

Logger.getLogger("org.apache.http.level").setLevel(Level.ALL);

 

 

This produces log entries for the classes under
org.apache.commons.httpclient, but nothing

for data going over the wire.

 

I can't seem to figure out what I am missing / not doing correctly.

 

Any help is appreciated.

 

Thanks

 

 

 


Re: Wire Logging

by Bindul Bhowmik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Danny,

On Wed, Jun 3, 2009 at 13:53, Danny Gallagher
<danny.gallagher@...> wrote:

> Using 3.1
>
>
>
> I cannot seem to get wire logging to produce anything in my log.
>
>
>
> Here is the code:
>
>
>
> FileHandler defaultHandler = new FileHandler(path + "BBD%u.log", 50000,
> 1, true);
>
> Logger.getLogger("").addHandler(defaultHandler);
>
> Logger.getLogger("org.apache.commons.httpclient").setLevel(Level.ALL);
>
>
>
> Logger.getLogger("org.apache.http.wire.level").setLevel(Level.ALL);
>
> Logger.getLogger("org.apache.http.level").setLevel(Level.ALL);
>

You might want to change the two lines above to:
Logger.getLogger("org.apache.http.wire").setLevel(Level.ALL);
Logger.getLogger("org.apache.http").setLevel(Level.ALL);

Basically remove the '.level' from the logger names.

>
>
>
>
> This produces log entries for the classes under
> org.apache.commons.httpclient, but nothing
>
> for data going over the wire.
>
>
>
> I can't seem to figure out what I am missing / not doing correctly.
>
>
>
> Any help is appreciated.
>
>
>
> Thanks
>

HTH
Bindul

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@...
For additional commands, e-mail: httpclient-users-help@...


Parent Message unknown RE: Wire Logging

by Danny Gallagher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bindul,

Thanks, sometimes even if the problem is staring you right in the face, you can't see it.

I removed the .level from the logger names.

Still no logging of data over the wire.

I've tried various ways of setting up the logging, passing as JVM options,
setting in the JAVA_HOME..../logging.properties file.....

If I wasn't seeing the logging for org.apache.commons.httpclient in my log, I
would assume it was something I was doing wrong, but that logging is showing up,
so I'm somewhat confused as to why one would show up, but not the others.

Anything else I might try?

Thanks for the help.

RE: Wire Logging

by Ken Krugler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>Bindul,
>
>Thanks, sometimes even if the problem is staring you right in the
>face, you can't see it.
>
>I removed the .level from the logger names.
>
>Still no logging of data over the wire.
>
>I've tried various ways of setting up the logging, passing as JVM options,
>setting in the JAVA_HOME..../logging.properties file.....
>
>If I wasn't seeing the logging for org.apache.commons.httpclient in my log, I
>would assume it was something I was doing wrong, but that logging is
>showing up,
>so I'm somewhat confused as to why one would show up, but not the others.
>
>Anything else I might try?

IIRC, with HttpClient 3.1 there was a weird thing where
"httpclient.wire" was the name of the wire logger, not
org.apache.<whatever>

-- Ken
--
Ken Krugler
+1 530-210-6378

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@...
For additional commands, e-mail: httpclient-users-help@...


RE: Wire Logging

by Danny Gallagher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ken,

Thanks, that did it.

I would have never figured that out.

Your help is much appreciated.

-----Original Message-----
From: Ken Krugler [mailto:kkrugler_lists@...]
Sent: Wednesday, June 03, 2009 10:56 PM
To: HttpClient User Discussion
Subject: RE: Wire Logging

>Bindul,
>
>Thanks, sometimes even if the problem is staring you right in the
>face, you can't see it.
>
>I removed the .level from the logger names.
>
>Still no logging of data over the wire.
>
>I've tried various ways of setting up the logging, passing as JVM
options,
>setting in the JAVA_HOME..../logging.properties file.....
>
>If I wasn't seeing the logging for org.apache.commons.httpclient in my
log, I
>would assume it was something I was doing wrong, but that logging is
>showing up,
>so I'm somewhat confused as to why one would show up, but not the
others.
>
>Anything else I might try?

IIRC, with HttpClient 3.1 there was a weird thing where
"httpclient.wire" was the name of the wire logger, not
org.apache.<whatever>

-- Ken
--
Ken Krugler
+1 530-210-6378

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@...
For additional commands, e-mail: httpclient-users-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@...
For additional commands, e-mail: httpclient-users-help@...