Created
April 23, 2010 13:38
-
-
Save morimori/376543 to your computer and use it in GitHub Desktop.
RAILS_ENV からログを判別して tail -f するタスク
This file contains 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 :log do | |
desc "tail -f log/#{RAILS_ENV || 'development'}.log" | |
task :tail do | |
sh "tail -f log/#{RAILS_ENV || 'development'}.log" rescue RuntimeError | |
puts | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment