Introduce an *empty* debug type

This debug type will always be enabled whenever any debugging is enables
and it outputs debug messages that cannot be categorized among any of
imap, maildir (e.g. things that concern the sync logic).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-05-01 20:18:28 +02:00 committed by Nicolas Sebrecht
parent 6add201436
commit 3d4dc11a8b
2 changed files with 4 additions and 2 deletions

View File

@ -222,7 +222,8 @@ class OfflineImap:
ui._msg("Debug mode: Forcing to singlethreaded.")
options.singlethreaded = True
for type in options.debugtype.split(','):
debugtypes = options.debugtype.split(',') + ['']
for type in debugtypes:
type = type.strip()
ui.add_debug(type)
if type.lower() == 'imap':

View File

@ -25,7 +25,8 @@ from StringIO import StringIO
from Queue import Empty
import offlineimap
debugtypes = {'imap': 'IMAP protocol debugging',
debugtypes = {'':'Other offlineimap related sync messages',
'imap': 'IMAP protocol debugging',
'maildir': 'Maildir repository debugging',
'thread': 'Threading debugging'}