From 689fe31710dc45302f332824682aa4aca76b1f39 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 30 Dec 2012 18:54:49 +0100 Subject: [PATCH] handle nbxmpp logging with -l option (-l .nbxmpp.client_nb=INFO for example) --- src/common/logging_helpers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/logging_helpers.py b/src/common/logging_helpers.py index 50b22f3b0..22bc7ab73 100644 --- a/src/common/logging_helpers.py +++ b/src/common/logging_helpers.py @@ -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)