Skip to content
This repository has been archived by the owner on Jul 14, 2018. It is now read-only.

Latest commit

 

History

History
28 lines (15 loc) · 1.16 KB

2.x-DSL-Action-Inspection-Stream.md

File metadata and controls

28 lines (15 loc) · 1.16 KB

Definition

stream(command, options={}) 

Module

Capistrano::Configuration::Actions::Inspect 

The stream helper is intended to make it easier to watch the output of text-heavy commands (like tailing or grepping logs). It also omits the standard log prefix (indicating which server and which stream the text came from).

stream "tail -f /u/apps/social/shared/log/production.log"
stream "grep shinybluething.com /var/log/maillog"

Arguments

command

This must be a string containing the shell command (or commands) to execute. It has identical semantics and syntax to the command argument for the run helper.

options

See run for a full description of all supported options. The only exception is the :once option, which capture ignores. (It will only run on the first matching server, regardless of the value of the :once option.)

Caveats

If any text is received via the stderr stream, it will be printed to the console using the standard log prefix (with server name and stream name). If you don't want that (you want both stderr and stdout to display without the log prefix) you'll need to redirect stderr to stdout:

stream "ls -l / 2>&1"