SW Task Event Loop Framework v1.0.0
High-performance C++ asynchronous event loop framework with timer management and promise-based programming
|
Centralized debug and logging macros for SW Task Framework components. More...
#include <iostream>
#include <string>
Go to the source code of this file.
Macros | |
#define | TIMER_DEBUG_ENABLED 0 |
Enable/disable debug output for TimerManager operations. | |
#define | SLLOOPER_DEBUG_ENABLED 0 |
Enable/disable debug output for SLLooper operations. | |
#define | EventQueue_DEBUG_ENABLED 0 |
Enable/disable debug output for EventQueue operations. | |
#define | TIMER_DEBUG(msg) |
Conditional debug logging for TimerManager with simple message. | |
#define | TIMER_DEBUG_STREAM(stream_expr) |
Conditional debug logging for TimerManager with stream expression. | |
#define | TIMER_ERROR(msg) std::cout << "[TimerManager ERROR] " << msg << std::endl |
Always-on error logging for TimerManager critical issues. | |
#define | TIMER_ERROR_STREAM(stream_expr) std::cout << "[TimerManager ERROR] " << stream_expr << std::endl |
Always-on error logging for TimerManager with stream expression. | |
#define | TIMER_INFO(msg) std::cout << "[TimerManager] " << msg << std::endl |
Always-on info logging for TimerManager lifecycle events. | |
#define | TIMER_INFO_STREAM(stream_expr) std::cout << "[TimerManager] " << stream_expr << std::endl |
Always-on info logging for TimerManager with stream expression. | |
#define | SLLOOPER_DEBUG(msg) |
Conditional debug logging for SLLooper operations. | |
#define | SLLOOPER_DEBUG_STREAM(stream_expr) |
Conditional debug logging for SLLooper with stream expression. | |
#define | SLLOOPER_ERROR(msg) std::cout << "[SLLooper ERROR] " << msg << std::endl |
Always-on error logging for SLLooper critical issues. | |
#define | SLLOOPER_ERROR_STREAM(stream_expr) std::cout << "[SLLooper ERROR] " << stream_expr << std::endl |
Always-on error logging for SLLooper with stream expression. | |
#define | SLLOOPER_INFO(msg) std::cout << "[SLLooper] " << msg << std::endl |
Always-on info logging for SLLooper lifecycle events. | |
#define | SLLOOPER_INFO_STREAM(stream_expr) std::cout << "[SLLooper] " << stream_expr << std::endl |
Always-on info logging for SLLooper with stream expression. | |
#define | EventQueue_DEBUG(msg) |
Conditional debug logging for EventQueue operations. | |
#define | EventQueue_DEBUG_STREAM(stream_expr) |
Conditional debug logging for EventQueue with stream expression. | |
#define | EventQueue_ERROR(msg) std::cout << "[EventQueue ERROR] " << msg << std::endl |
Always-on error logging for EventQueue critical issues. | |
#define | EventQueue_ERROR_STREAM(stream_expr) std::cout << "[EventQueue ERROR] " << stream_expr << std::endl |
Always-on error logging for EventQueue with stream expression. | |
#define | EventQueue_INFO(msg) std::cout << "[EventQueue] " << msg << std::endl |
Always-on info logging for EventQueue lifecycle events. | |
#define | EventQueue_INFO_STREAM(stream_expr) |
Always-on info logging for EventQueue with stream expression. | |
Centralized debug and logging macros for SW Task Framework components.
Definition in file Debug.h.
#define EventQueue_DEBUG | ( | msg | ) |
Conditional debug logging for EventQueue operations.
msg | String literal or expression for debug message |
Prints debug message with [EventQueue] prefix only if EventQueue_DEBUG_ENABLED is true. Useful for debugging message queuing and function execution.
#define EventQueue_DEBUG_ENABLED 0 |
Enable/disable debug output for EventQueue operations.
Controls whether debug messages from EventQueue are printed. Default is 0 (disabled) for production builds. Helps debug message queuing, function enqueuing, and polling behavior.
#define EventQueue_DEBUG_STREAM | ( | stream_expr | ) |
Conditional debug logging for EventQueue with stream expression.
stream_expr | Stream expression for formatted debug output |
Prints debug message using stream operations only if EventQueue_DEBUG_ENABLED is true. Supports detailed queue state and timing information.
#define EventQueue_ERROR | ( | msg | ) | std::cout << "[EventQueue ERROR] " << msg << std::endl |
Always-on error logging for EventQueue critical issues.
msg | String literal or expression for error message |
Prints error message with [EventQueue ERROR] prefix unconditionally. Used for critical queue operation errors that should always be logged.
#define EventQueue_ERROR_STREAM | ( | stream_expr | ) | std::cout << "[EventQueue ERROR] " << stream_expr << std::endl |
#define EventQueue_INFO | ( | msg | ) | std::cout << "[EventQueue] " << msg << std::endl |
Always-on info logging for EventQueue lifecycle events.
msg | String literal or expression for info message |
Prints informational message with [EventQueue] prefix unconditionally. Used for important queue lifecycle events and significant state changes.
#define EventQueue_INFO_STREAM | ( | stream_expr | ) |
Always-on info logging for EventQueue with stream expression.
stream_expr | Stream expression for formatted info output |
#define SLLOOPER_DEBUG | ( | msg | ) |
Conditional debug logging for SLLooper operations.
msg | String literal or expression for debug message |
Prints debug message with [SLLooper] prefix only if SLLOOPER_DEBUG_ENABLED is true. Useful for debugging event loop behavior and task execution.
#define SLLOOPER_DEBUG_ENABLED 0 |
Enable/disable debug output for SLLooper operations.
Controls whether debug messages from SLLooper are printed. Default is 0 (disabled) for production builds. Useful for debugging event loop behavior, task posting, and thread coordination.
#define SLLOOPER_DEBUG_STREAM | ( | stream_expr | ) |
Conditional debug logging for SLLooper with stream expression.
stream_expr | Stream expression for formatted debug output |
Prints debug message using stream operations only if SLLOOPER_DEBUG_ENABLED is true. Allows detailed formatting of debug information.
#define SLLOOPER_ERROR | ( | msg | ) | std::cout << "[SLLooper ERROR] " << msg << std::endl |
Always-on error logging for SLLooper critical issues.
msg | String literal or expression for error message |
Prints error message with [SLLooper ERROR] prefix unconditionally. Used for critical errors in event loop operation that should always be logged (e.g., thread creation failures, queue corruption).
#define SLLOOPER_ERROR_STREAM | ( | stream_expr | ) | std::cout << "[SLLooper ERROR] " << stream_expr << std::endl |
#define SLLOOPER_INFO | ( | msg | ) | std::cout << "[SLLooper] " << msg << std::endl |
Always-on info logging for SLLooper lifecycle events.
msg | String literal or expression for info message |
Prints informational message with [SLLooper] prefix unconditionally. Used for important event loop lifecycle events and state transitions.
#define SLLOOPER_INFO_STREAM | ( | stream_expr | ) | std::cout << "[SLLooper] " << stream_expr << std::endl |
#define TIMER_DEBUG | ( | msg | ) |
Conditional debug logging for TimerManager with simple message.
msg | String literal or expression for debug message |
Prints debug message with [TimerManager] prefix only if TIMER_DEBUG_ENABLED is true. Uses do-while(0) idiom for safe macro expansion in all contexts.
#define TIMER_DEBUG_ENABLED 0 |
Enable/disable debug output for TimerManager operations.
Controls whether debug messages from TimerManager are printed. Default is 0 (disabled) for production builds. Can be overridden at compile time with -DTIMER_DEBUG_ENABLED=1.
#define TIMER_DEBUG_STREAM | ( | stream_expr | ) |
Conditional debug logging for TimerManager with stream expression.
stream_expr | Stream expression (e.g., "Timer " << id << " expired") |
Prints debug message using stream operations only if TIMER_DEBUG_ENABLED is true. Allows complex formatted output with variables and expressions.
#define TIMER_ERROR | ( | msg | ) | std::cout << "[TimerManager ERROR] " << msg << std::endl |
Always-on error logging for TimerManager critical issues.
msg | String literal or expression for error message |
Prints error message with [TimerManager ERROR] prefix unconditionally. Used for critical errors that should always be logged regardless of debug settings (e.g., system call failures, resource allocation errors).
#define TIMER_ERROR_STREAM | ( | stream_expr | ) | std::cout << "[TimerManager ERROR] " << stream_expr << std::endl |
Always-on error logging for TimerManager with stream expression.
stream_expr | Stream expression for formatted error output |
Prints error message using stream operations unconditionally. Supports complex formatted error messages with variables and context.
#define TIMER_INFO | ( | msg | ) | std::cout << "[TimerManager] " << msg << std::endl |
Always-on info logging for TimerManager lifecycle events.
msg | String literal or expression for info message |
Prints informational message with [TimerManager] prefix unconditionally. Used for important lifecycle events that should be logged in production (e.g., initialization, shutdown, significant state changes).
#define TIMER_INFO_STREAM | ( | stream_expr | ) | std::cout << "[TimerManager] " << stream_expr << std::endl |
Always-on info logging for TimerManager with stream expression.
stream_expr | Stream expression for formatted info output |
Prints informational message using stream operations unconditionally. Supports formatted output for detailed lifecycle information.