Logging macros and utilities.
More...
|
|
#define | YATL_ENABLE_LOGGING |
| | Enable YATL logging.
|
| #define | YATL_LOG(level, fmt, ...) |
| | Log a message with level, file, line, and function context.
|
Logging macros and utilities.
◆ YATL_LOG
| #define YATL_LOG |
( |
| level, |
|
|
| fmt, |
|
|
| ... ) |
Value: do { \
if ((level) >= LOG_LEVEL) { \
fprintf(stderr, "[%s] %s:%d (%s): " fmt "\n", log_level_str(level), \
__FILE__, __LINE__, __func__, ##__VA_ARGS__); \
} \
} while (0)
Log a message with level, file, line, and function context.
- Parameters
-
| level | Log level (YATL_LOG_DEBUG, YATL_LOG_INFO, etc.) |
| fmt | Printf-style format string |
| ... | Format arguments |
◆ YATL_log_level_t
Log levels for YATL diagnostic messages.
| Enumerator |
|---|
| YATL_LOG_DEBUG | Debug-level messages
|
| YATL_LOG_INFO | Informational messages
|
| YATL_LOG_WARN | Warning messages
|
| YATL_LOG_ERROR | Error messages
|