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:
parent
bc1a18d7bd
commit
a9f9ae385e
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue