Re: HTTP logging

2012-02-20 Thread Vinay Sajip
On Feb 20, 5:47 pm, Vinay Sajip wrote: > I will reinstate it in the reference API docs, but the answer to > Jason's problem is to either subclass HTTPHandler and override > handleError to suppress the error, or set logging.raiseExceptions to > True (in which case all logging exceptions will be sw

Re: HTTP logging

2012-02-20 Thread Vinay Sajip
On Feb 20, 5:07 pm, Jean-Michel Pichavant wrote: > However, I looked into the code and find out an (undocumented ?) > attribute of the logging module : raiseException which value is set to 1 > by default (python 2.5.2 logging.__version__ < '0.5.0.2' > ). > > When set to 1, handlerError print the

Re: HTTP logging

2012-02-20 Thread Jean-Michel Pichavant
Arnaud Delobelle wrote: On 20 February 2012 16:03, Jason Friedman wrote: I am logging to HTTP: logger.addHandler(logging.handlers.HTTPHandler(host, url)) Works great, except if my HTTP server happens to be unavailable: socket.error: [Errno 111] Connection refused Other than wrapping all

Re: HTTP logging

2012-02-20 Thread Arnaud Delobelle
On 20 February 2012 16:03, Jason Friedman wrote: > I am logging to HTTP: > > logger.addHandler(logging.handlers.HTTPHandler(host, url)) > > Works great, except if my HTTP server happens to be unavailable: > > socket.error: [Errno 111] Connection refused > > Other than wrapping all my logger.log()

HTTP logging

2012-02-20 Thread Jason Friedman
I am logging to HTTP: logger.addHandler(logging.handlers.HTTPHandler(host, url)) Works great, except if my HTTP server happens to be unavailable: socket.error: [Errno 111] Connection refused Other than wrapping all my logger.log() calls in try/except blocks, is there a way to skip logging to th

Re: httplib HTTP: Logging request message

2008-07-01 Thread tom
I guess the easies way to do it is to copy and modify the httplib module to log both outgoing and incoming messages. -- http://mail.python.org/mailman/listinfo/python-list

httplib HTTP: Logging request message

2008-06-27 Thread tom
With module httplid, I can do conn.request("POST", "/target", params, headers) Now, I want to log the request message that is sent by the request method. I don't don't see a method for that task. Any suggestion? For a response, I can log the response message by using the call method. Though, I