diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-06-08 00:09:50 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-06-08 01:40:14 -0700 |
commit | 5e1b46d4c285124737abe2e08dec97e4af1f4be7 (patch) | |
tree | 6e095b5dcc6b91f83062014258a853ec5bcb95c9 /activesupport | |
parent | 7fe8b630ce47f62409aabb609e81ff676df56bd3 (diff) | |
download | rails-5e1b46d4c285124737abe2e08dec97e4af1f4be7.tar.gz rails-5e1b46d4c285124737abe2e08dec97e4af1f4be7.tar.bz2 rails-5e1b46d4c285124737abe2e08dec97e4af1f4be7.zip |
Don't rely on Rails.logger
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/kernel/debugger.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel/debugger.rb b/activesupport/lib/active_support/core_ext/kernel/debugger.rb index 4007a647be..0813a51383 100644 --- a/activesupport/lib/active_support/core_ext/kernel/debugger.rb +++ b/activesupport/lib/active_support/core_ext/kernel/debugger.rb @@ -2,12 +2,14 @@ module Kernel unless respond_to?(:debugger) # Starts a debugging session if ruby-debug has been loaded (call script/server --debugger to do load it). def debugger - Rails.logger.info "\n***** Debugger requested, but was not available: Start server with --debugger to enable *****\n" + message = "\n***** Debugger requested, but was not available: Start server with --debugger to enable *****\n" + defined?(Rails) ? Rails.logger.info(message) : $stderr.puts(message) end end def breakpoint - Rails.logger.info "\n***** The 'breakpoint' command has been renamed 'debugger' -- please change *****\n" + message = "\n***** The 'breakpoint' command has been renamed 'debugger' -- please change *****\n" + defined?(Rails) ? Rails.logger.info(message) : $stderr.puts(message) debugger end end |