aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-12-10 18:07:02 -0600
committerJoshua Peek <josh@joshpeek.com>2008-12-10 18:08:14 -0600
commit75fa82418d54b36b6092767f2a2b5c1d5324441b (patch)
tree965aa9dea789dd06576a54e7658a64c4560bad09 /activesupport/lib/active_support
parent455c7f9e37fda2969e52698b766413fc735eb488 (diff)
downloadrails-75fa82418d54b36b6092767f2a2b5c1d5324441b.tar.gz
rails-75fa82418d54b36b6092767f2a2b5c1d5324441b.tar.bz2
rails-75fa82418d54b36b6092767f2a2b5c1d5324441b.zip
Prefer Rails.logger over RAILS_DEFAULT_LOGGER
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/dependencies.rb6
-rw-r--r--activesupport/lib/active_support/deprecation.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 293450c180..23b7aee514 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -559,9 +559,9 @@ module ActiveSupport #:nodoc:
# Old style environment.rb referenced this method directly. Please note, it doesn't
# actually *do* anything any more.
def self.root(*args)
- if defined?(RAILS_DEFAULT_LOGGER)
- RAILS_DEFAULT_LOGGER.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases."
- RAILS_DEFAULT_LOGGER.warn "For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19"
+ if defined? Rails && Rails.logger
+ Rails.logger.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases."
+ Rails.logger.warn "For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19"
end
end
end
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index 543e3b08d2..f18ea197a5 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -13,7 +13,7 @@ module ActiveSupport
$stderr.puts callstack.join("\n ") if debug
},
'development' => Proc.new { |message, callstack|
- logger = defined?(::RAILS_DEFAULT_LOGGER) ? ::RAILS_DEFAULT_LOGGER : Logger.new($stderr)
+ logger = defined? Rails ? Rails.logger : Logger.new($stderr)
logger.warn message
logger.debug callstack.join("\n ") if debug
}