Fun with Python and Javascript

ontheplates.com - mybucket.co - Didip Kerabat

Posts tagged fabric

0 notes

Fabric logger “ssh.transport” woes

Today I finally had the opportunity to use Fabric (v.1.4). True to “hello world” spirit, this is my fabfile.py setup:

from fabric.api import run

def ps_aux():
    run(‘ps aux’)


And then fabric freak out and complain about this:

No handlers could be found for logger “ssh.transport”

This type of error usually occur when a module uses logging standard library. So, to make logging module stop making sad face, we need to set the log level on “ssh.transport”:

logging.basicConfig()
logging.getLogger(‘ssh.transport’).setLevel(logging.INFO)

That’s it.

Filed under python fabric