Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20625 > unrolled thread

Re: HTTP logging

Started byArnaud Delobelle <arnodel@gmail.com>
First post2012-02-20 16:16 +0000
Last post2012-02-20 16:16 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: HTTP logging Arnaud Delobelle <arnodel@gmail.com> - 2012-02-20 16:16 +0000

#20625 — Re: HTTP logging

FromArnaud Delobelle <arnodel@gmail.com>
Date2012-02-20 16:16 +0000
SubjectRe: HTTP logging
Message-ID<mailman.13.1329754605.3037.python-list@python.org>
On 20 February 2012 16:03, Jason Friedman <jason@powerpull.net> 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() calls in try/except blocks, is
> there a way to skip logging to the HTTPhandler if the HTTP server is
> unavailable?

Here's one: subclass HTTPHandler :)

-- 
Arnaud

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web