Sha256: 3d545e159d5a6d229b60d3ea2e8514b2d1ddc4f110cc78dd0e9df2aa50ec74ae
Contents?: true
Size: 590 Bytes
Versions: 4
Compression:
Stored size: 590 Bytes
Contents
require "logger" require "nokogiri" require "savon/log_message" module Savon class Logger def initialize(device = $stdout) self.device = device end attr_accessor :device def log(message, options = {}) log_raw LogMessage.new(message, filter, options).to_s end attr_writer :subject, :level, :filter def subject @subject ||= ::Logger.new(device) end def level @level ||= :debug end def filter @filter ||= [] end private def log_raw(message) subject.send(level, message) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
savon-1.2.0 | lib/savon/logger.rb |
savon-1.1.0 | lib/savon/logger.rb |
savon-1.0.0 | lib/savon/logger.rb |
savon-0.9.14 | lib/savon/logger.rb |