7#include <unordered_map>
9#include <userver/alerts/storage.hpp>
10#include <userver/components/component_fwd.hpp>
11#include <userver/components/raw_component_base.hpp>
12#include <userver/concurrent/async_event_source.hpp>
13#include <userver/os_signals/component.hpp>
15#include <userver/rcu/rcu_map.hpp>
16#include <userver/utils/fast_pimpl.hpp>
17#include <userver/utils/periodic_task.hpp>
18#include <userver/utils/statistics/entry.hpp>
19#include <userver/utils/statistics/writer.hpp>
23USERVER_NAMESPACE_BEGIN
82 Logging(
const ComponentConfig&,
const ComponentContext&);
101 void StartSocketLoggingDebug(
const std::optional<
logging::
Level>& log_level);
102 void StopSocketLoggingDebug(
const std::optional<
logging::
Level>& log_level);
106 void TryReopenFiles();
108 void WriteStatistics(
utils::statistics::Writer& writer)
const;
110 static yaml_config::Schema GetStaticConfigSchema();
113 void Init(
const ComponentConfig&,
const ComponentContext&);
114 void Stop()
noexcept;
118 engine::TaskProcessor* fs_task_processor_{
nullptr};
119 std::unordered_map<std::string, std::shared_ptr<logging::impl::TpLogger>> loggers_;
120 rcu::RcuMap<std::string, logging::LoggerPtr> extra_loggers_;
121 utils::PeriodicTask flush_task_;
122 logging::impl::TcpSocketSink* socket_sink_{
nullptr};
123 alerts::Storage& alert_storage_;
127 utils::statistics::Entry statistics_holder_;
131inline constexpr bool kHasValidate<Logging> =
true;