Module: Webrat::Logging

Included in:
Scope, Session
Defined in:
lib/webrat/core/logging.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#debug_log(message) ⇒ Object

:nodoc:



4
5
6
7
# File 'lib/webrat/core/logging.rb', line 4

def debug_log(message) # :nodoc:
  return unless logger
  logger.debug message
end

#loggerObject

:nodoc:



9
10
11
12
13
14
15
16
17
18
# File 'lib/webrat/core/logging.rb', line 9

def logger # :nodoc:
  case Webrat.configuration.mode
  when :rails
    defined?(RAILS_DEFAULT_LOGGER) ? RAILS_DEFAULT_LOGGER : nil
  when :merb
    Merb.logger
  else
    nil
  end
end