From 798ea473865e6d4a4ed2a35987ba40d2fcbfaf6f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 4 Jun 2010 13:49:09 -0700 Subject: configurator: logger: drop "close" requirement Rack::Lint in Rack 1.1.0 does not require a "close" method for env["rack.logger"], and we never explicitly close our logger, either. This more easily allows the use of alternative Logger-like implementations such as SyslogLogger. --- lib/unicorn/configurator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index 4fa745d..86e58a0 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -79,13 +79,13 @@ module Unicorn # sets object to the +new+ Logger-like object. The new logger-like # object must respond to the following methods: - # +debug+, +info+, +warn+, +error+, +fatal+, +close+ + # +debug+, +info+, +warn+, +error+, +fatal+ # The default Logger will log its output to the path specified # by +stderr_path+. If you're running Unicorn daemonized, then # you must specify a path to prevent error messages from going # to /dev/null. def logger(new) - %w(debug info warn error fatal close).each do |m| + %w(debug info warn error fatal).each do |m| new.respond_to?(m) and next raise ArgumentError, "logger=#{new} does not respond to method=#{m}" end -- cgit v1.2.3-24-ge0c7