Skip to content

Instantly share code, notes, and snippets.

@itamar
Created July 7, 2013 09:33
Show Gist options
  • Select an option

  • Save itamar/5942928 to your computer and use it in GitHub Desktop.

Select an option

Save itamar/5942928 to your computer and use it in GitHub Desktop.
Tail production log file.
desc "tail production log files"
task :tail_p, :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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment