fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] logging to file?


From: Chris Withers
Subject: Re: [Fab-user] logging to file?
Date: Thu, 26 Jan 2012 09:38:23 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:5.0) Gecko/20110624 Thunderbird/5.0

On 25/01/2012 22:18, Jeff Forcier wrote:
On Wed, Jan 25, 2012 at 10:24 AM, Chris Withers<address@hidden>  wrote:

- when does fabric write to stderr versus stdout?

It tries to be "Unix-y", so normal information like "Running task 'x'"
and such goes to stdout; errors/aborts/tracebacks should go to stderr;
remote stdout/stderr are sent to the appropriate local stream; etc.

I suspect there's a graceful hack that could replace sys.stdout and sys.stderr with things that write to the python logging framework at INFO and ERROR respectively, then it'd just be a case of wiring up a StreamHandler for the console and a FileHandler for the log-file, if it's specified in an option.

- what happens with password prompts and the like?

Those won't work well when redirecting, no, so you'd have to ensure
your task(s) can be run noninteractively by setting Fab env vars like
env.password, using ssh keys, those sorts of things.

Yeah, I'm waiting for Kerberos support for that to be true ;-)

What's blocking 1.4? Anything I can do to help?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk



reply via email to

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