1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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 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