[Imaplib2-devel] imaplib2 debugging
Sebastian Spaeth
Sebastian at SSpaeth.de
Sat May 7 10:42:32 BST 2011
On Sat, 07 May 2011 10:37:45 +1000, Piers Lauder <piers at janeelix.com> wrote:
> I have committed a new version of imaplib2 with extra logging, and a
> new paremeter to the class 'debug_buf_lvl' (default: 3), that controls
> log buffering.
>
> So, to invoke IMAP4 with output to stderr at logging level 3, one would
> invoke as:
> IMAP4(..., debug=3, debug_buf_lvl=2)
One more question:
Calling IMAP4(debug=3,...) will call:
_init_debug(self, debug=3,...):
self.debug = debug is not None and debug or Debug is not None and
Debuggor 0
so self.debug becomes a Boolean, rather than an int, right?
Because in def _log() and elsewhere you use:
if lvl>self.debug:
<actually log something>
which would be true for any value >1 of lvl. Or am I grossly misreading
things?
Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110507/9049a278/attachment-0001.sig>
More information about the OfflineIMAP-project
mailing list