Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
log_collector.cpp File Reference

Asynchronous log collector implementation with jthread compatibility. More...

#include <kcenon/logger/core/log_collector.h>
#include <kcenon/logger/writers/base_writer.h>
#include <kcenon/logger/interfaces/log_entry.h>
#include <kcenon/common/interfaces/logger_interface.h>
#include "../impl/async/jthread_compat.h"
#include <atomic>
#include <condition_variable>
#include <cstdio>
#include <functional>
#include <memory>
#include <mutex>
#include <queue>
#include <thread>
#include <vector>
Include dependency graph for log_collector.cpp:

Go to the source code of this file.

Classes

struct  kcenon::logger::log_collector_shared_state
 Shared state for log processing - survives impl destruction. More...
 
class  kcenon::logger::log_collector_jthread_worker
 Worker thread for log processing with jthread compatibility. More...
 
class  kcenon::logger::log_collector::impl
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 

Detailed Description

Asynchronous log collector implementation with jthread compatibility.

This implementation uses C++20 std::jthread with std::stop_token for cooperative cancellation where available, with fallback to std::thread for environments without jthread support (e.g., libc++).

Since
1.3.0 - Refactored to use jthread compatibility layer

Definition in file log_collector.cpp.