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
This commit is contained in:
Dimos Alevizos 2013-05-17 13:36:40 +03:00 committed by Michael DeHaan
parent 14aa54172c
commit e96bc981ce

View file

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