fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] redirecting output.


From: Jeff Forcier
Subject: Re: [Fab-user] redirecting output.
Date: Mon, 18 Oct 2010 12:47:11 -0400

Do you want Fabric's own stdout (i.e. all the "connecting to X,
running task Y" stuff) or just the stdout of a program Fabric is
running on the target server (i.e. the directory listing from run("ls
/foo"))?

The former isn't really possible inside Fabric until we get
consolidated logging (which is definitely on the table but not
implemented yet), the latter should've been highlighted in the API and
tutorial -- you just assign the return value of run(), sudo() etc and
those are strings containing the stdout.

Best,
Jeff

On Mon, Oct 18, 2010 at 12:35 PM, Jeff Honey <address@hidden> wrote:
> I've looked through the API docs and am scratching my head here. How do I 
> capture Fabric's output to STDOUT and put it in a file? I know I can just do 
> a simple redirection within the cmdline statement but I need to take that 
> output and stick it in an email, the code for which is included in the 
> function.
>
> The email code I've got just uses smtplib and pulls in a txt file.
>
>
> --
>  ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
> ¤ kyoboku kazeoshi ¤
>  ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>



-- 
Jeff Forcier
Unix sysadmin; Python/Ruby developer
http://bitprophet.org



reply via email to

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