userver
C++ Async Framework
Loading...
Searching...
No Matches
null_logger.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/logging/null_logger.hpp
4
/// @brief @copybrief logging::MakeNullLogger()
5
6
#
include
<
userver
/
logging
/
fwd
.
hpp
>
7
8
USERVER_NAMESPACE_BEGIN
9
10
namespace
logging
{
11
12
/// @brief Returns a logger that drops all incoming messages
13
/// @see components::Logging
14
TextLoggerRef
GetNullLogger
()
noexcept
;
15
16
/// @brief Creates a logger that drops all incoming messages.
17
///
18
/// Use GetNullLogger() is you need a reference to logger.
19
///
20
/// @see components::Logging
21
TextLoggerPtr
MakeNullLogger
();
22
23
namespace
impl {
24
25
// Creates a logger that drops all incoming messages, but
26
// * reports log level INFO (customizable) to force forming those messages;
27
// * uses Formats::kRaw to produce reasonable CPU usage for formatting logs.
28
TextLoggerPtr MakeNoopLoggerForTests();
29
30
}
// namespace impl
31
32
}
// namespace logging
33
34
USERVER_NAMESPACE_END
userver
logging
null_logger.hpp
Generated on Tue Nov 11 2025 16:15:54 for userver by
Doxygen
1.13.2