Updated: October 28, 2024 |
Add a debug entry in the ADAS library logs
#include <adas/adas_log.h>
#define ADAS_PRINT(format, ...) \ adas_log_print(stdout, "%.15s %.3d: " format, strrchr(__FILE__, '/') ? \ strrchr(__FILE__, '/') + 1 : __FILE__, __LINE__, ##__VA_ARGS__)
The macro works similar to a printf() where a format string is provided and variable-length arguments provide the values to set in the format string.