Skip to content

Instantly share code, notes, and snippets.

@robinboening
Created October 1, 2013 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robinboening/6775601 to your computer and use it in GitHub Desktop.
Save robinboening/6775601 to your computer and use it in GitHub Desktop.
Capistrano tasks to take a look into the logfiles on the remote server.
namespace :logs do
desc "show last 100 lines of your remote logfile."
task :tail do
run "tail -n100 #{shared_path}/log/#{rails_env}.log"
end
desc "watch your logfile and see additional data being appended."
task :watch do
stream("tail -f #{shared_path}/log/#{rails_env}.log")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment