Created
November 4, 2011 14:40
-
-
Save mm53bar/1339472 to your computer and use it in GitHub Desktop.
Log your servers with Capistrano
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
| require File.join(File.dirname(__FILE__), 'deploy/log') | |
| # .... | |
| # insert the rest of your capistrano script here |
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
| # from https://github.com/webficient/capistrano-recipes/blob/master/lib/recipes/log.rb | |
| Capistrano::Configuration.instance.load do | |
| namespace :log do | |
| desc "Tail all application log files" | |
| task :tail, :roles => :app do | |
| run "tail -f #{current_path}/log/*.log" do |channel, stream, data| | |
| puts "#{channel[:host]}: #{data}" | |
| break if stream == :err | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment