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

Optional thread_system integration for advanced async processing. More...

#include <kcenon/logger/logger_export.h>
#include <atomic>
#include <functional>
#include <memory>
#include <mutex>
#include <string>
Include dependency graph for thread_system_integration.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kcenon::logger::integration::thread_system_integration
 Stub implementation when thread_system is not available. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 
namespace  kcenon::logger::integration
 

Enumerations

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

Functions

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

Detailed Description

Optional thread_system integration for advanced async processing.

Author
kcenon
Since
1.4.0

This file provides optional integration with the thread_system library for users who want to leverage its advanced thread pool features instead of the standalone std::jthread implementation.

The integration is compile-time optional and controlled by:

  • CMake option: LOGGER_USE_THREAD_SYSTEM
  • Compile definition: LOGGER_HAS_THREAD_SYSTEM

When thread_system is not available, all integration classes and functions are excluded via preprocessor conditionals, ensuring zero overhead for standalone builds.

Key features when enabled:

  • Use thread_system's thread_pool for async log processing
  • Benefit from advanced thread pool features (priority queuing, metrics)
  • Runtime switching between standalone and thread_pool backends
  • Automatic fallback to standalone mode if thread_pool is not configured
Note
Part of Issue #224: Add optional thread_system integration support
See also
async_worker For the standalone implementation
kcenon::thread::thread_pool For the thread_system thread pool

Definition in file thread_system_integration.h.