Skip to content

Commit

Permalink
Don't rely on Rails.logger
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Jun 8, 2009
1 parent 7fe8b63 commit 5e1b46d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions activesupport/lib/active_support/core_ext/kernel/debugger.rb
Expand Up @@ -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

0 comments on commit 5e1b46d

Please sign in to comment.