Is there's a way to capture Capistrano's output with tee?

903 views
Skip to first unread message

Manuel Vázquez Acosta

unread,
May 18, 2011, 9:42:24 PM5/18/11
to capis...@googlegroups.com
Hi,

I'm trying to capture capistrano's output with tee in order to watch and
persist its output. But the file is being created with no content at
all. How can I make something like this work?

$ cap deploy | tee "`date +%s`-deploy.txt"

Best regards,
manuel.

manuelva.vcf

Rafa García

unread,
May 19, 2011, 4:18:23 AM5/19/11
to capis...@googlegroups.com
Hi Manuel,

  By default Capistrano uses STDERROR to print messages. You can change it passing -l (or --logger) parameter to change this behaviour. If you run "cap -h" you will see:


   -l [STDERR|STDOUT|file]          Choose logger method. STDERR used by default.
        --logger

Regards


--
* You received this message because you are subscribed to the Google Groups "Capistrano" group.
* To post to this group, send email to capis...@googlegroups.com
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en

Manuel Vázquez Acosta

unread,
May 19, 2011, 10:40:05 AM5/19/11
to capis...@googlegroups.com
Thanks!
manuelva.vcf

shrinath_m2

unread,
Apr 25, 2012, 1:13:26 AM4/25/12
to capis...@googlegroups.com
OK, I tried cap -h, I don't see such an option... Am I missing something or is there a new way to achieve this? 
I would love to redirect capistrano's output to a file and show my "puts" statements on the screen... Possible? 


On Thursday, May 19, 2011 1:48:23 PM UTC+5:30, Rafa G. wrote:
Hi Manuel,

  By default Capistrano uses STDERROR to print messages. You can change it passing -l (or --logger) parameter to change this behaviour. If you run "cap -h" you will see:


   -l [STDERR|STDOUT|file]          Choose logger method. STDERR used by default.
        --logger

Regards

El 19 de mayo de 2011 03:42, Manuel Vázquez Acosta <manu...@uci.cu> escribió:
Hi,

I'm trying to capture capistrano's output with tee in order to watch and persist its output. But the file is being created with no content at all. How can I make something like this work?

$ cap deploy | tee "`date +%s`-deploy.txt"

Best regards,
manuel.

--
* You received this message because you are subscribed to the Google Groups "Capistrano" group.
* To post to this group, send email to capis...@googlegroups.com
* To unsubscribe from this group, send email to capistrano+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en

Lee Hambley

unread,
Apr 25, 2012, 3:21:06 AM4/25/12
to capis...@googlegroups.com
Please see "man tee" in your terminal, and a resource such as http://www.compbio.dundee.ac.uk/manuals/scanps/subsubsection3_7_1_1.html (the last example)

This should make it clear for you.
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en

Donovan Bray

unread,
Apr 26, 2012, 11:09:23 AM4/26/12
to capis...@googlegroups.com
I wrote a utility to always write a log of the deploy


So you never have to worry about doing at the command line. 
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
Reply all
Reply to author
Forward
0 new messages