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

Conditionally enables thread_system integration when available. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 
namespace  kcenon::logger::detail
 

Macros

#define LOGGER_THREAD_INTEGRATION_DETECTED
 
#define LOGGER_HAS_IEXECUTOR   0
 

Functions

constexpr bool kcenon::logger::detail::has_iexecutor_interface () noexcept
 Compile-time constant indicating IExecutor interface availability.
 
constexpr bool kcenon::logger::detail::has_any_executor_support () noexcept
 Compile-time constant indicating any async executor is available.
 

Detailed Description

Conditionally enables thread_system integration when available.

Since
1.3.0 - thread_system is now OPTIONAL (Issue #222)
1.5.0 - IExecutor interface support (Issue #253)

This header detects whether thread_system integration should be enabled based on:

  1. CMake option LOGGER_USE_THREAD_SYSTEM (sets USE_THREAD_SYSTEM macro)
  2. Header availability via __has_include
  3. IExecutor interface availability from common_system

When thread_system is not available, logger_system uses its standalone std::jthread implementation for async operations.

Integration Modes (Issue #253):

  • LEGACY: Direct thread_pool dependency (LOGGER_HAS_THREAD_SYSTEM)
  • EXECUTOR: IExecutor interface from common_system (LOGGER_HAS_IEXECUTOR)
  • STANDALONE: Built-in async_worker with std::jthread

Definition in file thread_integration_detector.h.

Macro Definition Documentation

◆ LOGGER_HAS_IEXECUTOR

#define LOGGER_HAS_IEXECUTOR   0

Definition at line 44 of file thread_integration_detector.h.

◆ LOGGER_THREAD_INTEGRATION_DETECTED

#define LOGGER_THREAD_INTEGRATION_DETECTED

Definition at line 29 of file thread_integration_detector.h.