68#include <kcenon/common/interfaces/logger_interface.h>
86using log_level = common::interfaces::log_level;
107class logger_metrics_collector;
108class log_filter_interface;
110#ifdef LOGGER_WITH_ANALYSIS
112class realtime_log_analyzer;
128using routing::log_router;
129using routing::route_config;
130using routing::router_builder;
157 public common::interfaces::ILogger {
177 explicit logger(
bool async =
true, std::size_t buffer_size = 8192,
178 std::unique_ptr<backends::integration_backend> backend =
nullptr);
207 const std::string& message)
override;
220 std::string_view message,
221 const common::source_location& loc = common::source_location::current())
override;
244 bool is_enabled(common::interfaces::log_level level)
const override;
263 common::interfaces::log_level get_level()
const override;
363 bool is_running()
const;
376 bool is_metrics_collection_enabled()
const;
421 bool remove_writer(
const std::string& name);
449 void set_filter(std::unique_ptr<log_filter_interface> filter);
457 bool has_filter()
const;
505 void set_router(std::unique_ptr<log_router> router);
513 bool has_routing()
const;
519#ifdef LOGGER_WITH_ANALYSIS
542 void set_realtime_analyzer(std::unique_ptr<analysis::realtime_log_analyzer> analyzer);
572 [[nodiscard]]
bool has_realtime_analysis()
const;
680 void set_sampler(std::unique_ptr<sampling::log_sampler> sampler);
704 [[nodiscard]]
bool has_sampling()
const;
719 void reset_sampling_stats();
732 int get_emergency_fd()
const override;
743 const char* get_emergency_buffer()
const override;
753 size_t get_emergency_buffer_size()
const override;
Real-time log analyzer with anomaly detection.
Base interface for all log writers and decorators.
logger_metrics_collector * get_metrics_collector()
Get metrics collector for direct access.
common::VoidResult reset_metrics()
Reset performance metrics.
std::unique_ptr< impl > pimpl_
result< std::unique_ptr< metrics::logger_performance_stats > > get_metrics_history(std::chrono::seconds duration) const
Get metrics history for a specific duration.
Log router for directing messages to specific writers.
Thread-safe log sampler with multiple strategy support.
Interface for loggers that support emergency flushing.
Fluent builder for creating structured log entries.
Unified interface for managing all types of logging context.
Error codes specific to the logger system.
Runtime polymorphism interface for integration backends kcenon.
Data structures for representing log entries and source locations kcenon.
Log routing functionality.
Base interface for all log writers and decorators.
DLL export/import macros for logger_system shared library support.
#define LOGGER_SYSTEM_API
Logger performance metrics and monitoring.
Common types and enumerations for logger system.
common::interfaces::log_level log_level
health_status
Health status levels.
metric_type
Types of metrics that can be recorded by the logger.
@ gauge
A metric that can go up or down (e.g., queue depth).
@ counter
A monotonically increasing metric (e.g., total messages).
@ histogram
A distribution of values (e.g., processing latency).
std::unique_ptr< log_writer_interface > log_writer_ptr
Type alias for writer unique pointer.
overflow_policy
Overflow policy for when buffers are full.
health_status
Health status enumeration.
OpenTelemetry context structure for trace correlation kcenon.
Configuration structures and enums for log sampling kcenon.
Signal-safe write wrapper for cross-platform signal handling.
Statistics about sampling behavior.
Fluent builder for structured log entries kcenon.
Conditionally enables thread_system integration when available.
Unified interface for managing all types of logging context.