From 5f478f5a9a58f72c0a844258b8ee614bf24ea9f7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 17 Jun 2011 08:54:37 +0000 Subject: error logging is more consistent Backtraces are now formatted properly (with timestamps) and exceptions will be logged more consistently and similar to Logger defaults: "#{exc.message} (#{e.class})" backtrace.each { |line| ... } This may break some existing monitoring scripts, but errors will be more standardized and easier to check moving forward. --- lib/unicorn/socket_helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/unicorn/socket_helper.rb') diff --git a/lib/unicorn/socket_helper.rb b/lib/unicorn/socket_helper.rb index 3519a7b..1d4e0f2 100644 --- a/lib/unicorn/socket_helper.rb +++ b/lib/unicorn/socket_helper.rb @@ -101,8 +101,7 @@ module Unicorn end sock.listen(opt[:backlog]) rescue => e - logger.error "error setting socket options: #{e.inspect}" - logger.error e.backtrace.join("\n") + Unicorn.log_error(logger, message, e) end def log_buffer_sizes(sock, pfx = '') -- cgit v1.2.3-24-ge0c7