Tail Multiple Log Files At Once With Capistrano
Join the DZone community and get the full member experience.
Join For FreeFrom http://errtheblog.com/post/21
Allows you to aggregate the tailing of multiple production log files with one Capistrano task
Stick it in deploy.rb:
desc "tail production log files"
task :tail_logs, :roles => :app do
run "tail -f #{shared_path}/log/production.log" do |channel, stream, data|
puts # for an extra line break before the host name
puts "#{channel[:host]}: #{data}"
break if stream == :err
end
end
Capistrano (software)
Opinions expressed by DZone contributors are their own.
Comments