Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't rely on Rails.logger

  • Loading branch information...
commit 4b4164e8a840970cfa558e0e7bf59ee1948b6506 1 parent 84a755b
@jeremy jeremy authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 activesupport/lib/active_support/core_ext/kernel/debugger.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.