|
From: | Nathan Brazil |
Subject: | Re: [Fab-user] redirecting output. |
Date: | Mon, 18 Oct 2010 22:30:22 -0700 |
I have fabric 0.9.2 running on Ubuntu, and I want to be able to capture whatever is printed to the console to a file as well. So here's what I did: 1. Modify /usr/local/bin/fab's #! line to have unbuffered output, like so: #!/usr/local/bin/python -u 2. Create a shell script named myfab that goes something like this: #!/usr/bin/env bash fab $* | tee log/`date +%FT%Hh%Mm%Ss`.log Now, whenever I run myfab instead of fab, the output is shown on screen as well as captured in a timestamped log file. However, there is a drawback in that stderr is not captured, such that if my fab script bombs out, the error message is absent from the log file. This is acceptable for now, though, since deployments are to be automated, but not unattended, IMHO. -- On Oct 18, 2010, at 9:35 AM, Jeff Honey wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |