title: Turning off logging in Paramiko
body: <p>I am using the ssh client provided by Paramiko to create a function call <code>remoteSSH</code> (the file name is <code>remoteConnect.py</code>):</p>
  
  <pre><code>import paramiko
  import logging
  logger = paramiko.util.logging.getLogger()
  logger.setLevel(logging.WARN)
  
  def remoteSSH(username,userpasswd):
      ....
  </code></pre>
  
  <p>Now I am calling the <code>remoteSSH</code> function in another Python module called <code>getData()</code> (<code>getdata.py</code>):</p>
  
  <pre><code>from remoteConnect import *
  import logging
  logger2=logging.getLogger()
  logger2.setLevel(logging.INFO)
  </code></pre>
  
  <p>However,  a call to <code>logger2.info('ccc')</code> also turns on all INFO level logging in the file that is importing the Paramiko module (i.e. <code>remoteConnect.py</code>)</p>
  
  <p>How do I turn off logging in <code>remoteConnect.py</code> so that Paramiko does not spit out all the INFO level messages?</p>