module Faraday::DetailedLogger::TaggedLogging
This was largely lifted from ActiveSupport::TaggedLogging. Modifications made to remove ActiveSupport dependencies (blank?, delegation, and ActiveSupport::Logger).
Public Class Methods
Source
# File lib/faraday/detailed_logger/tagged_logging.rb, line 59 def self.new(logger) unless logger.respond_to?(:tagged) logger.formatter ||= ::Logger::Formatter.new logger.formatter.extend Formatter logger.extend(self) end logger end
Public Instance Methods
Source
# File lib/faraday/detailed_logger/tagged_logging.rb, line 73 def flush clear_tags! super if defined?(super) end
Calls superclass method
Source
# File lib/faraday/detailed_logger/tagged_logging.rb, line 69 def tagged(*tags) formatter.tagged(*tags) { yield self } end