]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/api/include/opentelemetry/logs/severity.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / api / include / opentelemetry / logs / severity.h
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 #pragma once
5 #ifdef ENABLE_LOGS_PREVIEW
6
7 # include "opentelemetry/version.h"
8
9 OPENTELEMETRY_BEGIN_NAMESPACE
10 namespace logs
11 {
12
13 /**
14 * Severity Levels assigned to log events, based on Log Data Model,
15 * with the addition of kInvalid (mapped to a severity number of 0).
16 */
17 enum class Severity : uint8_t
18 {
19 kInvalid,
20 kTrace,
21 kTrace2,
22 kTrace3,
23 kTrace4,
24 kDebug,
25 kDebug2,
26 kDebug3,
27 kDebug4,
28 kInfo,
29 kInfo2,
30 kInfo3,
31 kInfo4,
32 kWarn,
33 kWarn2,
34 kWarn3,
35 kWarn4,
36 kError,
37 kError2,
38 kError3,
39 kError4,
40 kFatal,
41 kFatal2,
42 kFatal3,
43 kFatal4
44 };
45
46 /**
47 * Mapping of the severity enum above, to a severity text string (in all caps).
48 * This severity text can be printed out by exporters. Capital letters follow the
49 * spec naming convention.
50 *
51 * Included to follow the specification's recommendation to print both
52 * severity number and text in each log record.
53 */
54 const opentelemetry::nostd::string_view SeverityNumToText[25] = {
55 "INVALID", "TRACE", "TRACE2", "TRACE3", "TRACE4", "DEBUG", "DEBUG2", "DEBUG3", "DEBUG4",
56 "INFO", "INFO2", "INFO3", "INFO4", "WARN", "WARN2", "WARN3", "WARN4", "ERROR",
57 "ERROR2", "ERROR3", "ERROR4", "FATAL", "FATAL2", "FATAL3", "FATAL4"};
58
59 } // namespace logs
60 OPENTELEMETRY_END_NAMESPACE
61 #endif