Sha256: d79b866a73a663942c871c35f4651fa45a9b6032c761b6caf59b366841475ff9

Contents?: true

Size: 716 Bytes

Versions: 74

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

module GitlabQuality
  module TestTooling
    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

74 entries across 74 versions & 1 rubygems

Version Path
gitlab_quality-test_tooling-2.2.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-2.1.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-2.0.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.39.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.38.1 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.38.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.37.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.36.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.35.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.34.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.33.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.32.1 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.32.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.31.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.30.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.29.1 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.29.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.28.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.24.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb
gitlab_quality-test_tooling-1.23.0 lib/gitlab_quality/test_tooling/system_logs/log_types/log.rb