Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20625 > unrolled thread
| Started by | Arnaud Delobelle <arnodel@gmail.com> |
|---|---|
| First post | 2012-02-20 16:16 +0000 |
| Last post | 2012-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.
Re: HTTP logging Arnaud Delobelle <arnodel@gmail.com> - 2012-02-20 16:16 +0000
| From | Arnaud Delobelle <arnodel@gmail.com> |
|---|---|
| Date | 2012-02-20 16:16 +0000 |
| Subject | Re: 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
Back to top | Article view | comp.lang.python
csiph-web