Sha256: a1866b6d213343d615a5847e0543fd18cbee387374424bd72dfda69abdb0865d

Contents?: true

Size: 470 Bytes

Versions: 1

Compression:

Stored size: 470 Bytes

Contents

module Webrat
  module Logging #:nodoc:

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

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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
diabolo-webrat-0.5.1 lib/webrat/core/logging.rb