Browse Source

Set paramiko logging to DEBUG level

Connections to backends via paramiko often fail for obscure
reasons.

If the service log level is DEBUG, increase paramiko logging
to DEBUG level as well so that we have more information when issues
of this sort occur.

Change-Id: I44d8902d58c2ad48b8a37dfbff96c5b9471651e4
Tom Barron 3 months ago
parent
commit
575d6ae621
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      manila/utils.py

+ 2
- 0
manila/utils.py View File

@@ -53,6 +53,8 @@ from manila.i18n import _
53 53
 
54 54
 CONF = cfg.CONF
55 55
 LOG = log.getLogger(__name__)
56
+if hasattr('CONF', 'debug') and CONF.debug:
57
+    logging.getLogger("paramiko").setLevel(logging.DEBUG)
56 58
 
57 59
 _ISO8601_TIME_FORMAT_SUBSECOND = '%Y-%m-%dT%H:%M:%S.%f'
58 60
 _ISO8601_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S'

Loading…
Cancel
Save