Sha256: 9d2590adcd3a078646cde87febff8463893ca8fd54f044c9e424b4b54a5e9511

Contents?: true

Size: 433 Bytes

Versions: 29

Compression:

Stored size: 433 Bytes

Contents

require "logger"

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 ||= ::Logger.new("webrat.log")
      end
    end

  end
end

Version data entries

29 entries across 29 versions & 14 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/lib/webrat/core/logging.rb
indirect-webrat-0.7.5 lib/webrat/core/logging.rb
indirect-webrat-0.7.4 lib/webrat/core/logging.rb
webrat-0.7.3 lib/webrat/core/logging.rb
jbd-webrat-0.7.2.rails3 lib/webrat/core/logging.rb
webrat-0.7.2 lib/webrat/core/logging.rb
webrat-0.7.2.beta.2 lib/webrat/core/logging.rb
mutle-webrat-0.7.2.beta.1 lib/webrat/core/logging.rb
thoughtbot-webrat-0.7.2.pre lib/webrat/core/logging.rb
webrat-0.7.2.beta.1 lib/webrat/core/logging.rb
honkster-webrat-0.7.1.2 lib/webrat/core/logging.rb
honkster-webrat-0.7.1.1 lib/webrat/core/logging.rb
revo-webrat-0.7.0.1 lib/webrat/core/logging.rb
webrat-0.7.1 lib/webrat/core/logging.rb
davidtrogers-webrat-0.7.0 lib/webrat/core/logging.rb
revo-webrat-0.7.0 lib/webrat/core/logging.rb
revo-webrat-0.7.1.pre lib/webrat/core/logging.rb
webrat-0.7.0 lib/webrat/core/logging.rb
honkster-webrat-0.6.0.10 lib/webrat/core/logging.rb
honkster-webrat-0.6.0.9 lib/webrat/core/logging.rb