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
(cherry picked from commit 575d6ae621)
This commit is contained in:
Tom Barron 2018-12-30 16:55:14 -06:00
parent bb6256b5e8
commit 0cde7b098d
1 changed files with 2 additions and 0 deletions

View File

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