Skip to content

Instantly share code, notes, and snippets.

@wireframe
Created August 2, 2011 18:54
Show Gist options
  • Save wireframe/1120898 to your computer and use it in GitHub Desktop.
Save wireframe/1120898 to your computer and use it in GitHub Desktop.
# see http://errtheblog.com/posts/19-streaming-capistrano
namespace :logs do
desc "tail production log files"
task :tail, :roles => :app do
run "tail -f #{shared_path}/log/production.log" do |channel, stream, data|
puts # for an extra line break before the host name
puts "#{channel[:host]}: #{data}"
break if stream == :err
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment