DebugUtils 1.0.0
Cross-platform logging macros for Arduino and native tests
Loading...
Searching...
No Matches
Macros
debug.h File Reference

Cross-platform logging and serial output for Arduino and native tests. More...

#include <Arduino.h>
Include dependency graph for debug.h:

Go to the source code of this file.

Macros

#define SERIAL_PORT   Serial
 Active serial backend used by logging macros (Arduino Serial by default).
 
#define LOG_ERROR   1
 Error level (1).
 
#define LOG_WARN   2
 Warning level (2).
 
#define LOG_INFO   3
 Info level (3, default).
 
#define LOG_DEBUG   4
 Debug level (4, verbose).
 
#define LOG_LEVEL   LOG_INFO
 Compile-time log threshold (defaults to LOG_INFO).
 
#define _PPE(...)   LOG_PRINT(LOG_ERROR, __VA_ARGS__)
 Print error level output without newline.
 
#define _PPW(...)   LOG_PRINT(LOG_WARN, __VA_ARGS__)
 Print warning level output without newline.
 
#define _PP(...)   LOG_PRINT(LOG_INFO, __VA_ARGS__)
 Print info level output without newline.
 
#define _PPD(...)   LOG_PRINT(LOG_DEBUG, __VA_ARGS__)
 Print debug level output without newline.
 
#define _PLE(...)   LOG_PRINTLN(LOG_ERROR, __VA_ARGS__)
 Print error level output with newline.
 
#define _PLW(...)   LOG_PRINTLN(LOG_WARN, __VA_ARGS__)
 Print warning level output with newline.
 
#define _PL(...)   LOG_PRINTLN(LOG_INFO, __VA_ARGS__)
 Print info level output with newline.
 
#define _PLD(...)   LOG_PRINTLN(LOG_DEBUG, __VA_ARGS__)
 Print debug level output with newline.
 

Detailed Description

Cross-platform logging and serial output for Arduino and native tests.

Provides unified logging interface across:

Typical usage:

#define _DEBUG_
#define LOG_LEVEL LOG_DEBUG
#include <debug.h>
void setup() {
SERIAL_PORT.begin();
_PL("DebugUtils initialized");
}
Cross-platform logging and serial output for Arduino and native tests.
#define SERIAL_PORT
Active serial backend used by logging macros (Arduino Serial by default).
Definition debug.h:223
#define _PL(...)
Print info level output with newline.
Definition debug.h:296
Author
Cal Abel
Date
2026

Definition in file debug.h.