Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
kcenon::logger::integration Namespace Reference

Classes

class  executor_integration
 Stub implementation when IExecutor is not available. More...
 
class  thread_system_integration
 Stub implementation when thread_system is not available. More...
 

Enumerations

enum class  async_backend_type { standalone , thread_pool }
 Backend type enumeration for async processing. More...
 

Functions

constexpr bool has_executor_support () noexcept
 
constexpr bool has_thread_system_support () noexcept
 Helper function to check if thread_system integration is available.
 

Enumeration Type Documentation

◆ async_backend_type

Backend type enumeration for async processing.

Defines the available backend implementations for async log processing. The backend can be selected at compile time (via CMake options) or runtime (via thread_system_integration::set_backend()).

Enumerator
standalone 

Standalone backend using std::jthread.

Default backend that requires no external dependencies. Uses the async_worker class with std::jthread for cooperative cancellation support.

thread_pool 

Thread pool backend using thread_system.

Advanced backend that uses thread_system's thread_pool for async processing. Only available when LOGGER_HAS_THREAD_SYSTEM is defined.

Benefits:

  • Shared thread pool for multiple loggers
  • Priority-based job scheduling
  • Built-in metrics and monitoring
  • Work stealing for load balancing

Definition at line 60 of file thread_system_integration.h.

60 {
69
84};
@ thread_pool
Thread pool backend using thread_system.

Function Documentation

◆ has_executor_support()

bool kcenon::logger::integration::has_executor_support ( )
nodiscardconstexprnoexcept

Definition at line 298 of file executor_integration.h.

298 {
299 return false;
300}

◆ has_thread_system_support()

bool kcenon::logger::integration::has_thread_system_support ( )
nodiscardconstexprnoexcept

Helper function to check if thread_system integration is available.

Returns
true if LOGGER_HAS_THREAD_SYSTEM is defined, false otherwise

This compile-time constant can be used to conditionally execute code that requires thread_system integration.

if constexpr (has_thread_system_support()) {
// Use thread_system features
} else {
// Use standalone features
}
constexpr bool has_thread_system_support() noexcept
Helper function to check if thread_system integration is available.

Definition at line 333 of file thread_system_integration.h.

333 {
334#ifdef LOGGER_HAS_THREAD_SYSTEM
335 return true;
336#else
337 return false;
338#endif
339}

References has_thread_system_support().

Referenced by has_thread_system_support().

Here is the call graph for this function:
Here is the caller graph for this function: