⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
userver
C++ Async Framework v2.0
Documentation
API Groups
Namespaces
Reference
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
y
Variables
k
n
r
u
w
Typedefs
c
d
h
m
n
o
p
s
t
u
v
Enumerations
a
b
c
d
f
h
i
l
o
p
r
s
t
u
v
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Symbols
File List
File Members
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
level.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/logging/level.hpp
4
/// @brief Log levels
5
6
#
include
<
cstdint
>
7
#
include
<
optional
>
8
#
include
<
string
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
/// Logging macro and utilities
13
namespace
logging
{
14
15
/// Log levels
16
enum
class
Level
:
std
::
uint8_t
{
17
kTrace = 0,
18
kDebug = 1,
19
kInfo = 2,
20
kWarning = 3,
21
kError = 4,
22
kCritical = 5,
23
kNone = 6
24
};
25
26
inline
constexpr
auto
kLevelMax =
static_cast
<
int
>(
Level
::kNone);
27
28
/// @brief Converts lowercase level name to a corresponding Level, throws
29
/// std::runtime_error if no matching log level found.
30
Level
LevelFromString
(
std
::
string_view
);
31
32
/// @brief Returns a string representation of logging level, e.g. "info"
33
std
::
string_view
ToString
(
Level
level
);
34
35
/// @brief Returns a string representation of logging level, e.g. "INFO"
36
std
::
string_view
ToUpperCaseString
(
Level
level
)
noexcept
;
37
38
/// @brief Returns std::nullopt if level_name is std::nullopt, otherwise
39
/// behaves exactly like logging::LevelFromString.
40
std::optional<
Level
>
OptionalLevelFromString
(
41
const
std::optional<std::string>& level_name);
42
43
}
// namespace logging
44
45
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
logging
level.hpp
Generated on Wed May 15 2024 22:34:06 for userver by
Doxygen
1.10.0