diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-05-28 14:40:08 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-05-28 14:40:08 -0700 |
commit | a0ac12caf12d453d36f8a78569bf470ab6ecb9cf (patch) | |
tree | 64b22c93d0e6a90023cefe650736ecb069fb2220 /lib/unicorn.rb | |
parent | 19cbfe209a0f9d64e9faade1549c1b9910bf35f7 (diff) | |
download | unicorn-a0ac12caf12d453d36f8a78569bf470ab6ecb9cf.tar.gz |
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
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r-- | lib/unicorn.rb | 5 |
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}" |