about summary refs log tree commit homepage
path: root/lib/rainbows/http_server.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-10-20 17:48:57 -0700
committerEric Wong <normalperson@yhbt.net>2010-10-21 00:49:34 +0000
commita085ba3586756ac1f778d2862f75889de2449b0e (patch)
treebc991d1191069c79744f904334806f15ee6c98d5 /lib/rainbows/http_server.rb
parentad821f70a2488a91f2be1ac53cb2e64f50743989 (diff)
downloadrainbows-a085ba3586756ac1f778d2862f75889de2449b0e.tar.gz
Sometimes we have stupid syntax or constant resolution
errors in our code.
Diffstat (limited to 'lib/rainbows/http_server.rb')
-rw-r--r--lib/rainbows/http_server.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb
index 72e2c7f..a5cb054 100644
--- a/lib/rainbows/http_server.rb
+++ b/lib/rainbows/http_server.rb
@@ -13,6 +13,7 @@ module Rainbows
 
     def initialize(app, options)
       G.server = self
+      @logger = Unicorn::Configurator::DEFAULTS[:logger]
       rv = super(app, options)
       defined?(@use) or use(:Base)
       @worker_connections ||= MODEL_WORKER_CONNECTIONS[@use]
@@ -43,7 +44,9 @@ module Rainbows
       model = args.shift or return @use
       mod = begin
         Rainbows.const_get(model)
-      rescue NameError
+      rescue NameError => e
+        logger.error "error loading #{model.inspect}: #{e}"
+        e.backtrace.each { |l| logger.error l }
         raise ArgumentError, "concurrency model #{model.inspect} not supported"
       end