userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
logging_configurator.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <memory>
7
#include <string_view>
8
9
#include <
userver/components/component_fwd.hpp
>
10
#include <
userver/components/raw_component_base.hpp
>
11
#include <
userver/dynamic_config/fwd.hpp
>
12
#include <
userver/utils/statistics/fwd.hpp
>
13
14
#include <dynamic_config/variables/USERVER_LOG_DYNAMIC_DEBUG.hpp>
15
16
USERVER_NAMESPACE_BEGIN
17
18
namespace
logging
{
19
struct
DynamicDebugConfig;
20
struct
TelemetryConfig
;
21
}
// namespace logging
22
23
namespace
components
{
24
46
class
LoggingConfigurator final :
public
RawComponentBase {
47
public
:
50
static
constexpr
std::string_view
kName
=
"logging-configurator"
;
51
52
LoggingConfigurator(
const
ComponentConfig
& config,
const
ComponentContext
& context);
53
54
~LoggingConfigurator()
override
;
55
61
void
SetRestrictions
(
logging::TelemetryConfig
restrictions);
62
63
static
yaml_config::Schema
GetStaticConfigSchema();
64
65
private
:
66
class
TelemetryState;
67
68
void
OnConfigUpdate(
const
dynamic_config::Diff
& diff);
69
70
utils::statistics::MetricsStoragePtr metrics_storage_;
71
const
std::unique_ptr<TelemetryState> telemetry_;
72
};
73
75
76
template
<>
77
inline
constexpr
bool
kHasValidate<LoggingConfigurator>
=
true
;
78
79
}
// namespace components
80
81
USERVER_NAMESPACE_END
userver
components
logging_configurator.hpp
Generated on
for userver by
Doxygen
1.17.0