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:



6
7
8
9
# File 'lib/webrat/core/logging.rb', line 6

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

#loggerObject

:nodoc:



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

def logger # :nodoc:
  case Webrat.configuration.mode
  when :rails
    defined?(RAILS_DEFAULT_LOGGER) ? RAILS_DEFAULT_LOGGER : nil
  when :merb
    Merb.logger
  else
    @logger ||= ::Logger.new("webrat.log")
  end
end