Sha256: 6114c30a90edd5c7a54601cb48e0db8ed0311daf4a613b037846786e022ae99c

Contents?: true

Size: 475 Bytes

Versions: 4

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

require "logger"
require "time"

module Buildkite::TestCollector
  class Logger < ::Logger
    class Formatter < ::Logger::Formatter
      def call(severity, time, _program, message)
        "#{time.utc.iso8601(9)} pid=#{::Process.pid} tid=#{::Thread.current.object_id} #{severity}: #{message}\n"
      end
    end

    def initialize(*args, **kwargs)
      super
      self.formatter = Buildkite::TestCollector.log_formatter
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
buildkite-test_collector-1.1.1 lib/buildkite/test_collector/logger.rb
buildkite-test_collector-1.1.0 lib/buildkite/test_collector/logger.rb
buildkite-test_collector-1.0.1 lib/buildkite/test_collector/logger.rb
buildkite-test_collector-1.0.0 lib/buildkite/test_collector/logger.rb