Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
integration_backend.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 <string>
8#include <kcenon/common/interfaces/logger_interface.h>
9
30
31// Type alias for log_level
32using log_level = common::interfaces::log_level;
33
49public:
53 virtual ~integration_backend() = default;
54
69 virtual log_level normalize_level(int external_level) const = 0;
70
85 virtual std::string get_backend_name() const = 0;
86
98 virtual bool requires_initialization() const {
99 return false;
100 }
101
114 virtual bool initialize() {
115 return true;
116 }
117
128 virtual void shutdown() {
129 // Default: no-op
130 }
131};
132
133} // namespace kcenon::logger::backends
Abstract interface for integration backends.
Definition backends.cppm:52
virtual std::string get_backend_name() const =0
virtual void shutdown()
Shutdown the backend.
virtual bool requires_initialization() const
Check if backend requires special initialization.
virtual bool initialize()
Initialize the backend.
virtual log_level normalize_level(int external_level) const =0
Normalize external log level to internal level.
virtual ~integration_backend()=default
Virtual destructor.