|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Worker thread for log processing with jthread compatibility. More...

Public Member Functions | |
| log_collector_jthread_worker (std::shared_ptr< log_collector_shared_state > state) | |
| ~log_collector_jthread_worker () | |
| void | start () |
| void | stop () |
| void | notify_work () |
| bool | is_running () const noexcept |
Static Private Member Functions | |
| static void | worker_loop (std::shared_ptr< log_collector_shared_state > state, async::simple_stop_source &stop) |
| static void | write_to_all (const std::shared_ptr< log_collector_shared_state > &state, const log_entry &entry) |
Private Attributes | |
| std::shared_ptr< log_collector_shared_state > | state_ |
| async::compat_jthread | thread_ |
| std::atomic< bool > | running_ |
Worker thread for log processing with jthread compatibility.
Uses std::jthread where available, falls back to std::thread with manual stop mechanism otherwise.
Definition at line 69 of file log_collector.cpp.
|
inlineexplicit |
Definition at line 71 of file log_collector.cpp.
|
inline |
Definition at line 76 of file log_collector.cpp.
References stop().

|
inlinenodiscardnoexcept |
Definition at line 125 of file log_collector.cpp.
References running_.
|
inline |
Definition at line 119 of file log_collector.cpp.
References state_.
|
inline |
Definition at line 80 of file log_collector.cpp.
References running_, state_, stop(), thread_, and worker_loop().

|
inline |
Definition at line 102 of file log_collector.cpp.
References kcenon::logger::async::compat_jthread::join(), kcenon::logger::async::compat_jthread::request_stop(), running_, state_, and thread_.
Referenced by start(), worker_loop(), and ~log_collector_jthread_worker().


|
inlinestaticprivate |
Definition at line 173 of file log_collector.cpp.
References stop(), and write_to_all().
Referenced by start().


|
inlinestaticprivate |
Definition at line 216 of file log_collector.cpp.
Referenced by worker_loop().

|
private |
Definition at line 247 of file log_collector.cpp.
Referenced by is_running(), start(), and stop().
|
private |
Definition at line 245 of file log_collector.cpp.
Referenced by notify_work(), start(), and stop().
|
private |
Definition at line 246 of file log_collector.cpp.