Set paramiko's logging level

Excplicity set paramiko's logging level to WARNING.
By default it inherits ansible's DEBUG logging level (set in
callbacks.py) and fills the log file with useless debug messages.
Obviously it only applies if log_path is set in ansible.cfg
pull/2960/head
Dimos Alevizos 12 years ago committed by Michael DeHaan
parent 14aa54172c
commit e96bc981ce

@ -20,6 +20,7 @@ import os
import pipes import pipes
import socket import socket
import random import random
import logging
from ansible.callbacks import vvv from ansible.callbacks import vvv
from ansible import errors from ansible import errors
from ansible import utils from ansible import utils
@ -31,6 +32,7 @@ with warnings.catch_warnings():
try: try:
import paramiko import paramiko
HAVE_PARAMIKO=True HAVE_PARAMIKO=True
logging.getLogger("paramiko").setLevel(logging.WARNING)
except ImportError: except ImportError:
pass pass

Loading…
Cancel
Save