Sha256: 5951a421d4667936f66e6db7949dccb9bb10f25c2f385167dc6df437c0fc280e

Contents?: true

Size: 466 Bytes

Versions: 33

Compression:

Stored size: 466 Bytes

Contents

require 'logger'
require 'semantic_logger'

module PactBroker
  module Logging
    class DefaultFormatter < SemanticLogger::Formatters::Default
      def initialize
        @formatter = ::Logger::Formatter.new
      end

      def call(log, output)
        self.log    = log
        self.logger = logger
        @formatter.call(log.level.upcase, log.time, nil, [tags, named_tags, duration, message, payload, exception].compact.join(" "))
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.79.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.78.1 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.78.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.77.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.76.2 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.76.1 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.76.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.75.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.74.1 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.74.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.73.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.72.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.71.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.70.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.69.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.68.1 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.68.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.67.0 lib/pact_broker/logging/default_formatter.rb
pact_broker-2.66.0 lib/pact_broker/logging/default_formatter.rb