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

Fayaz Yusuf Khan fayaz.yusuf.khan at
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 
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
-------------- 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: <>

More information about the Python-list mailing list