1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Explicitly require logger

This commit is contained in:
Jeremy Kemper 2009-10-14 17:54:45 -07:00
parent bc1a18d7bd
commit a9f9ae385e

View file

@ -23,7 +23,13 @@ module ActiveSupport
$stderr.puts callstack.join("\n ") if debug
},
'development' => Proc.new { |message, callstack|
logger = (Rails.logger if defined?(Rails)) || Logger.new($stderr)
logger =
if defined?(Rails) && Rails.logger
Rails.logger
else
require 'logger'
Logger.new($stderr)
end
logger.warn message
logger.debug callstack.join("\n ") if debug
}