fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Re: How do I enable debugging when using API


From: Mohamed Lrhazi
Subject: [Fab-user] Re: How do I enable debugging when using API
Date: Fri, 1 Apr 2011 14:37:43 -0400

I figure a bit of this out...
I can get some low level debug info at the transport layer by doing
one of these two:

import paramiko
paramiko.common.logging.basicConfig(level=paramiko.common.DEBUG)

OR:

log = logging.getLogger()
log.setLevel(logging.DEBUG)
handler = logging.FileHandler("log.out")
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s
- %(message)s")
handler.setFormatter(formatter)
log.addHandler(handler)


I still dont see how to get the actual shell level debug info... when
a command fails, can I see what exactly was sent and waht was
recieved?
are there specififc fabric or paramico modules whose logger I could
get and change?

like:
logging.getLogger('fabric.network')
logging.getLogger('fabric.shellstuff')


Thanks a lot.
Mohamed.


On Thu, Mar 31, 2011 at 9:02 PM, Mohamed Lrhazi <address@hidden> wrote:
> When not using fabfile style, how do I enable debugging so I can see
> SSH level debugging info?
> I have hosts for which my connections always fail, for auth reasons,
> but to which I can login fine directly.
>
> I tried this, but did not see any additional logs on the console:
>
> import fabric
> fabric.state.output.debug=True
>
> and:
>
> import fabric
> fabric.state.output['debug']=True
>
> Thanks a lot.
> Mohamed.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]