]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Change logging
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 28 May 2020 15:41:08 +0000 (17:41 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 28 May 2020 15:41:08 +0000 (17:41 +0200)
lib/cr_vmware_tpl/app.py

index 0123b3a9679a4543a5e8477f300a306941f5e60a..41e4e6b68712a2dbd5b23cb3fa9e9f456737f7f7 100644 (file)
@@ -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):
         """