Skip to content

Commit

Permalink
feat: Add severity number to logs-api (#1622)
Browse files Browse the repository at this point in the history
* feat: Add severity number logs-api

* add require
  • Loading branch information
khushijain21 authored Apr 2, 2024
1 parent 40171ab commit 35abeac
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions logs_api/lib/opentelemetry/logs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
require_relative 'logs/log_record'
require_relative 'logs/logger'
require_relative 'logs/logger_provider'
require_relative 'logs/severity_number'

module OpenTelemetry
# The Logs API records a timestamped record with metadata.
Expand Down
37 changes: 37 additions & 0 deletions logs_api/lib/opentelemetry/logs/severity_number.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

module OpenTelemetry
module Logs
class SeverityNumber
SEVERITY_NUMBER_UNSPECIFIED = 0
SEVERITY_NUMBER_TRACE = 1
SEVERITY_NUMBER_TRACE2 = 2
SEVERITY_NUMBER_TRACE3 = 3
SEVERITY_NUMBER_TRACE4 = 4
SEVERITY_NUMBER_DEBUG = 5
SEVERITY_NUMBER_DEBUG2 = 7
SEVERITY_NUMBER_DEBUG3 = 6
SEVERITY_NUMBER_DEBUG4 = 8
SEVERITY_NUMBER_INFO = 9
SEVERITY_NUMBER_INFO2 = 10
SEVERITY_NUMBER_INFO3 = 11
SEVERITY_NUMBER_INFO4 = 12
SEVERITY_NUMBER_WARN = 13
SEVERITY_NUMBER_WARN2 = 14
SEVERITY_NUMBER_WARN3 = 15
SEVERITY_NUMBER_WARN4 = 16
SEVERITY_NUMBER_ERROR = 17
SEVERITY_NUMBER_ERROR2 = 18
SEVERITY_NUMBER_ERROR3 = 19
SEVERITY_NUMBER_ERROR4 = 20
SEVERITY_NUMBER_FATAL = 21
SEVERITY_NUMBER_FATAL2 = 22
SEVERITY_NUMBER_FATAL3 = 23
SEVERITY_NUMBER_FATAL4 = 24
end
end
end

0 comments on commit 35abeac

Please sign in to comment.