handle nbxmpp logging with -l option (-l .nbxmpp.client_nb=INFO for example)

This commit is contained in:
Yann Leboulanger 2012-12-30 18:54:49 +01:00
parent 1e3a8ca866
commit 6879730568
1 changed files with 6 additions and 0 deletions

View File

@ -152,6 +152,12 @@ def init(use_color=False):
root_log.addHandler(consoleloghandler)
root_log.propagate = False
# handle nbxmpp logs too
root_log = logging.getLogger('nbxmpp')
root_log.setLevel(logging.WARNING)
root_log.addHandler(consoleloghandler)
root_log.propagate = False
def set_loglevels(loglevels_string):
parseAndSetLogLevels(loglevels_string)