From e4d0b226391948ef433f1d0135814315e4c48535 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 7 Aug 2010 04:25:51 +0000 Subject: log ERROR messages if workers exit with failure Something is wrong if workers exit with a non-zero status, so we'll increase the log level to help prevent people from missing it. --- lib/unicorn.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 8f490bb..52349f0 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -519,8 +519,8 @@ module Unicorn proc_name 'master' else worker = WORKERS.delete(wpid) and worker.tmp.close rescue nil - logger.info "reaped #{status.inspect} " \ - "worker=#{worker.nr rescue 'unknown'}" + m = "reaped #{status.inspect} worker=#{worker.nr rescue 'unknown'}" + status.success? ? logger.info(m) : logger.error(m) end end rescue Errno::ECHILD -- cgit v1.2.3-24-ge0c7