Permalink
Browse files

Explicitly require logger

  • Loading branch information...
1 parent bc1a18d commit a9f9ae385e2145b7f0d1ae43a7b66ed280b220b9 @jeremy jeremy committed Oct 15, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 activesupport/lib/active_support/deprecation/behaviors.rb
@@ -23,7 +23,13 @@ def default_behavior
$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
}

0 comments on commit a9f9ae3

Please sign in to comment.