Created
January 24, 2011 13:12
-
-
Save sumskyi/793192 to your computer and use it in GitHub Desktop.
cap_logs.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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