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()