about summary refs log tree commit homepage
path: root/lib/unicorn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r--lib/unicorn.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 9349e49..9a5eb6f 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -77,6 +77,11 @@ module Unicorn
       Unicorn::SocketHelper.sock_name(io)
     end
   end
+
+  def self.log_error(logger, message, exc)
+    logger.error "#{message}: #{exc.message} (#{exc.class})"
+    exc.backtrace.each { |line| logger.error(line) }
+  end
   # :startdoc:
 end
 # :enddoc: