From 9424b6232cfc026edbaff3404a65e3e944ae0381 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 28 May 2020 17:41:08 +0200 Subject: [PATCH] Change logging --- lib/cr_vmware_tpl/app.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/cr_vmware_tpl/app.py b/lib/cr_vmware_tpl/app.py index 0123b3a..41e4e6b 100644 --- a/lib/cr_vmware_tpl/app.py +++ b/lib/cr_vmware_tpl/app.py @@ -35,7 +35,7 @@ from .xlate import __base_dir__ as __xlate_base_dir__ from .xlate import __mo_file__ as __xlate_mo_file__ from .xlate import XLATOR, LOCALE_DIR, DOMAIN -__version__ = '1.1.1' +__version__ = '1.1.2' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -163,6 +163,21 @@ class CrTplApplication(BaseApplication): return res + # ------------------------------------------------------------------------- + def init_logging(self): + """Initialize the logger object.""" + + super(CrTplApplication, self).init_logging() + + if self.verbose < 4: + paramiko_logger = logging.getLogger('paramiko.transport') + if self.verbose < 2: + paramiko_logger.setLevel(logging.WARNING) + else: + paramiko_logger.setLevel(logging.INFO) + + return + # ------------------------------------------------------------------------- def post_init(self): """ -- 2.39.5