Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
logger_registry.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
5#pragma once
6
7#include <vector>
8#include <shared_mutex>
9
11
12// Forward declaration to avoid circular dependencies
14 class critical_logger_interface;
15}
16
27namespace kcenon::logger::core {
28
40public:
44 logger_registry() = default;
45
53 void register_logger(security::critical_logger_interface* log);
54
62 void unregister_logger(security::critical_logger_interface* log);
63
71 auto get_registered_loggers() const -> std::vector<security::critical_logger_interface*>;
72
77 bool empty() const;
78
83 size_t size() const;
84
85private:
87 std::vector<security::critical_logger_interface*> loggers_;
88
90 mutable std::shared_mutex mutex_;
91};
92
93} // namespace kcenon::logger::core
Manages registration and unregistration of loggers.
logger_registry()=default
Default constructor.
Interface for loggers that support emergency flushing.
DLL export/import macros for logger_system shared library support.
#define LOGGER_SYSTEM_API