is to use a capistrano task like (in my deploy.rb ) ,
task :tail_logs, :roles => :your_server_tag do
cap production deploy:tail_logs
run "tail -f #{current_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
Nessun commento:
Posta un commento