webrat/lib/webrat/core/logging.rb

21 lines
383 B
Ruby
Raw Normal View History

2008-04-05 16:49:18 +00:00
module Webrat
module Logging #:nodoc:
2008-04-05 16:49:18 +00:00
def debug_log(message) # :nodoc:
return unless logger
2008-04-16 09:54:37 +00:00
logger.debug message
2008-04-05 16:49:18 +00:00
end
def logger # :nodoc:
case Webrat.configuration.mode
2008-12-09 06:12:09 +00:00
when :rails
defined?(RAILS_DEFAULT_LOGGER) ? RAILS_DEFAULT_LOGGER : nil
2008-12-09 06:12:09 +00:00
when :merb
Merb.logger
2008-04-05 16:49:18 +00:00
else
nil
end
end
end
end