Sha256: 2ed127cbca2d62a46cd0b5181c67807781a86660040488d793d7c69fba0cf75c

Contents?: true

Size: 700 Bytes

Versions: 10

Compression:

Stored size: 700 Bytes

Contents

# frozen_string_literal: true

module Gitlab
  module QA
    module SystemLogs
      module LogTypes
        class Log
          def initialize(name, data)
            @name = name
            @data = data
          end

          attr_reader :name, :data

          def summary_fields
            [
              :severity,
              :correlation_id,
              :time,
              :message
            ]
          end

          def summary
            summary = {}

            summary_fields.each do |field|
              value = data[field]
              summary[field] = value unless value.nil?
            end

            summary
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gitlab-qa-10.3.0.1 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.6.0 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.5.0 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.4.1 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.4.0 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.3.0 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.2.2 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.2.1 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.2.0 lib/gitlab/qa/system_logs/log_types/log.rb
gitlab-qa-10.1.0 lib/gitlab/qa/system_logs/log_types/log.rb