userver
C++ Async Framework
Loading...
Searching...
No Matches
logger.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/logging/logger.hpp
4
/// @brief Logger definitions and helpers
5
6
#
include
<
memory
>
7
#
include
<
string
>
8
9
#
include
<
userver
/
logging
/
format
.
hpp
>
10
#
include
<
userver
/
logging
/
fwd
.
hpp
>
11
#
include
<
userver
/
logging
/
level
.
hpp
>
12
13
USERVER_NAMESPACE_BEGIN
14
15
namespace
logging
{
16
17
namespace
impl {
18
19
class
LoggerBase;
20
void
LogRaw(LoggerBase& logger,
Level
level, std::string_view message);
21
22
}
// namespace impl
23
24
/// @brief Creates synchronous stderr logger with default tskv pattern
25
/// @param name logger name, for internal use, must be unique
26
/// @see components::Logging
27
LoggerPtr
MakeStderrLogger
(
const
std::string& name,
Format
format,
28
Level
level =
Level
::kInfo);
29
30
/// @brief Creates synchronous stdout logger with default tskv pattern
31
/// @param name logger name, for internal use, must be unique
32
/// @see components::Logging
33
LoggerPtr
MakeStdoutLogger
(
const
std::string& name,
Format
format,
34
Level
level =
Level
::kInfo);
35
36
/// @brief Creates synchronous file logger with default tskv pattern
37
/// @param name logger name, for internal use, must be unique
38
/// @param path target log file path
39
/// @see components::Logging
40
LoggerPtr
MakeFileLogger
(
const
std::string& name,
const
std::string& path,
41
Format
format,
Level
level =
Level
::kInfo);
42
43
}
// namespace logging
44
45
USERVER_NAMESPACE_END
userver
logging
logger.hpp
Generated on Wed May 15 2024 22:19:58 for userver by
Doxygen
1.10.0