Skip to content

Instantly share code, notes, and snippets.

@carlosipe
Created May 10, 2013 12:53
Show Gist options
  • Save carlosipe/5554229 to your computer and use it in GitHub Desktop.
Save carlosipe/5554229 to your computer and use it in GitHub Desktop.
Capistrano - Tail log
desc "tail production log files"
task :tail_logs, :roles => :app do
trap("INT") { puts 'Interupted'; exit 0; }
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
@carlosipe
Copy link
Author

Install it in your shell instead of on each project:
http://streaming.nfm.id.au/getting-started-with-system-wide-capistrano-r/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment