|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Classes | |
| class | async_worker |
| Standalone async worker with jthread compatibility. More... | |
| class | batch_processing_jthread_worker |
| Worker thread for batch processing with jthread compatibility. More... | |
| class | batch_processor |
| Advanced batch processor with dynamic sizing and back-pressure handling. More... | |
| class | compat_cv_wait |
| Condition variable wait helper with stop support. More... | |
| class | compat_jthread |
| Wrapper for std::jthread or std::thread with manual stop mechanism. More... | |
| class | high_performance_async_writer |
| High-performance asynchronous writer. More... | |
| class | lockfree_mpmc_queue |
| Multi-producer multi-consumer lock-free queue (for future use) More... | |
| class | lockfree_spsc_queue |
| Lock-free single-producer single-consumer queue. More... | |
| class | simple_stop_source |
| Simple stop source for environments without std::stop_token. More... | |
Typedefs | |
| using | task_type = std::function<void()> |
| Task type for async worker. | |
Functions | |
| std::unique_ptr< batch_processor > | make_batch_processor (log_writer_ptr writer, const batch_processor::config &cfg=batch_processor::config{}) |
| Factory function to create a batch processor. | |
| std::unique_ptr< high_performance_async_writer > | make_high_performance_async_writer (log_writer_ptr writer, const high_performance_async_writer::config &cfg=high_performance_async_writer::config{}) |
| Factory function to create a high-performance async writer. | |
| template<typename T , size_t Size = 1024> | |
| std::unique_ptr< lockfree_spsc_queue< T, Size > > | make_lockfree_queue () |
| Factory function to create a lock-free queue. | |
| using kcenon::logger::async::task_type = std::function<void()> |
Task type for async worker.
A task is a callable that performs a logging operation. Using std::function allows flexible task composition.
Definition at line 47 of file async_worker.h.
| std::unique_ptr< batch_processor > kcenon::logger::async::make_batch_processor | ( | log_writer_ptr | writer, |
| const batch_processor::config & | cfg = batch_processor::config{} ) |
Factory function to create a batch processor.
| writer | Target writer |
| cfg | Configuration |
Definition at line 414 of file batch_processor.cpp.
| std::unique_ptr< high_performance_async_writer > kcenon::logger::async::make_high_performance_async_writer | ( | log_writer_ptr | writer, |
| const high_performance_async_writer::config & | cfg = high_performance_async_writer::config{} ) |
Factory function to create a high-performance async writer.
| writer | Writer to wrap |
| cfg | Configuration |
Definition at line 200 of file high_performance_async_writer.cpp.
| std::unique_ptr< lockfree_spsc_queue< T, Size > > kcenon::logger::async::make_lockfree_queue | ( | ) |
Factory function to create a lock-free queue.
| T | Element type |
| Size | Queue size (must be power of 2) |
Definition at line 197 of file lockfree_queue.h.