Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20624
| Date | 2012-02-20 16:03 +0000 |
|---|---|
| Subject | HTTP logging |
| From | Jason Friedman <jason@powerpull.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.12.1329753809.3037.python-list@python.org> (permalink) |
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?
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
HTTP logging Jason Friedman <jason@powerpull.net> - 2012-02-20 16:03 +0000
csiph-web