summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-05-28 14:40:08 -0700
committerEric Wong <normalperson@yhbt.net>2009-05-28 14:40:08 -0700
commita0ac12caf12d453d36f8a78569bf470ab6ecb9cf (patch)
tree64b22c93d0e6a90023cefe650736ecb069fb2220
parent19cbfe209a0f9d64e9faade1549c1b9910bf35f7 (diff)
Bah, it's so much busy work to deal with this as configuration
option.  Maybe I should say we allow any logger the user wants,
as long as it's $stderr :P
-rw-r--r--lib/unicorn.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 8a74f97..f43bb0f 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -144,6 +144,10 @@ module Unicorn
     def stdout_path=(path); redirect_io($stdout, path); end
     def stderr_path=(path); redirect_io($stderr, path); end
 
+    def logger=(obj)
+      REQUEST.logger = @logger = obj
+    end
+
     # sets the path for the PID file of the master process
     def pid=(path)
       if path
@@ -580,7 +584,6 @@ module Unicorn
         @config.commit!(self)
         kill_each_worker(:QUIT)
         Unicorn::Util.reopen_logs
-        REQUEST.logger = @logger
         @app = @orig_app
         build_app! if @preload_app
         logger.info "done reloading config_file=#{@config.config_file}"