I am using the ssh client provided by Paramiko to create a function call remoteSSH (the file name is remoteConnect.py):
remoteSSH
remoteConnect.py
import paramiko
Try this before setting up logger2:
logging.basicConfig(level=logging.WARN)