Skip to content

Instantly share code, notes, and snippets.

@sumskyi
Created January 24, 2011 13:12
Show Gist options
  • Select an option

  • Save sumskyi/793192 to your computer and use it in GitHub Desktop.

Select an option

Save sumskyi/793192 to your computer and use it in GitHub Desktop.
cap_logs.rb
namespace :logs do
desc '=> logs:rails'
task :default do
rails
end
desc "watch rails logs"
task :rails, :roles => :app do
stream "tail -f #{deploy_to}/shared/log/production.log"
end
desc "watch webservices logs"
task :webservices, :roles => :app do
stream "tail -f #{deploy_to}/shared/log/webservices_production.log"
end
desc "watch delayed_job logs"
task :delayed_job, :roles => :app do
stream "tail -f #{deploy_to}/shared/log/delayed_job.log"
end
# system wide logs
desc "watch /var/log/syslog"
task :syslog, :roles => :app do
stream "tail -f /var/log/syslog"
end
namespace :www do
desc "watch apache error log"
task :error, :roles => :web do
stream "tail -f /var/log/apache2/#{stage}_error.log"
end
desc "watch apache access log"
task :access, :roles => :web do
stream "tail -f /var/log/apache2/#{stage}_access.log"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment