|
From: | Nicolas Michel |
Subject: | Re: [Fab-user] logging to file? |
Date: | Thu, 26 Jan 2012 08:23:03 +0100 |
from fabric.context_managers import hide
def myjob():
with hide('everything'):
your code
result = run("my command")
if result.return_code == 0:
something
else:
something
On Wed, Jan 25, 2012 at 10:24 AM, Chris Withers <address@hidden> wrote:It tries to be "Unix-y", so normal information like "Running task 'x'"
> - when does fabric write to stderr versus stdout?
and such goes to stdout; errors/aborts/tracebacks should go to stderr;
remote stdout/stderr are sent to the appropriate local stream; etc.
Those won't work well when redirecting, no, so you'd have to ensure
> - what happens with password prompts and the like?
your task(s) can be run noninteractively by setting Fab env vars like
env.password, using ssh keys, those sorts of things.
-Jeff
>
>
> cheers,
>
> Chris
>
> --
> Simplistix - Content Management, Batch Processing & Python Consulting
> - http://www.simplistix.co.uk
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user
_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user
[Prev in Thread] | Current Thread | [Next in Thread] |