1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
5 #ifdef ENABLE_LOGS_PREVIEW
7 # include "opentelemetry/version.h"
9 OPENTELEMETRY_BEGIN_NAMESPACE
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).
17 enum class Severity
: uint8_t
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.
51 * Included to follow the specification's recommendation to print both
52 * severity number and text in each log record.
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"};
60 OPENTELEMETRY_END_NAMESPACE