LoginSignup
8
7

More than 5 years have passed since last update.

capistranoでtail -f

Last updated at Posted at 2012-01-17
config/deploy.rb
namespace :logging do
  task :tail_unicorn do
    run "tail -f #{shared_path}/log/unicorn.log" do |channel, stream, data|
      trap("INT") { puts "Interupted!"; exit 0; }
      puts "=== #{channel[:host]} ==="
      puts data
      break if stream == :err
    end
  end
end

StackOverflowの投稿のほぼコピペですが、非常に便利なので共有です。

8
7
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7