[Python-Dev] Some changes to logging for 3.2 (original) (raw)
Vinay Sajip vinay_sajip at yahoo.co.uk
Fri Sep 24 21:32:41 CEST 2010
- Previous message: [Python-Dev] Some changes to logging for 3.2
- Next message: [Python-Dev] Advice sought on memory allocation latency reduction C1X standard proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Chris Withers <chris simplistix.co.uk> writes:
Cool, how can I use it in Python 2.6? Chris
Hi Chris,
Copy the top part (imports, QueueHandler and QueueListener classes) from the Gist linked to in the article - http://gist.github.com/591699 - into a utility module you can use again and again.
In your code, try to import them from logging.handlers and in an except ImportError: clause, import them from your utility module.
Profit ;-)
Note that there's a slight change in the Gist from when the post was published - but it should still work as per the post. Until 3.2 is out, there may be other small changes: but you can copy the code over from the 3.2 branch in the Python SVN repository later and it should work fine under Python 2.6 and 2.7.
Of course if you do find any problems (or have any other questions), please let me know asap :-)
Regards,
Vinay Sajip
- Previous message: [Python-Dev] Some changes to logging for 3.2
- Next message: [Python-Dev] Advice sought on memory allocation latency reduction C1X standard proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]