Should I acquire lock for logging.Handler.flush()?

Fayaz Yusuf Khan fayaz.yusuf.khan at gmail.com
Tue Feb 21 08:23:37 CET 2012


I'm writing a custom logging Handler that sends emails through AWS Simple 
Email Service using the boto library.
As there's a quota cap on how many (200) emails I can send within 24hrs, I 
think I need to buffer my log messages from the emit() calls (Or is that a bad 
idea?).
And I was reading the Handler documentation and was confused if I should call 
the acquire() and release() methods from within a flush() call.
-- 
Fayaz Yusuf Khan
Cloud developer and architect
Dexetra SS, Bangalore, India
fayaz.yusuf.khan_AT_gmail_DOT_com
fayaz_AT_dexetra_DOT_com
+91-9746-830-823
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/python-list/attachments/20120221/61efda57/attachment.sig>


More information about the Python-list mailing list