Class: Logger

Inherits:
Object show all
Includes:
LoggerHelpers
Defined in:
lib/logging.rb

Overview

Monkey-patch the built-in Ruby Logger class to support implicit backtrace printing TODO: Figure out if this is actually useful.

Instance Method Summary collapse

Methods included from LoggerHelpers

#extract_backtrace, #generate_message

Instance Method Details

#error(error_or_message, error = nil) ⇒ Object



145
146
147
148
149
# File 'lib/logging.rb', line 145

def error(error_or_message, error = nil)
  return extract_backtrace(error_or_message) if error.nil?
  original_error(generate_message(error_or_message, error))
  extract_backtrace(original_error(error))
end

#original_errorObject



144
# File 'lib/logging.rb', line 144

alias original_error error