util: provide better alignment for the function name/line no in trace

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1161>
This commit is contained in:
Peter Hutterer 2025-03-14 14:12:27 +10:00
parent 056bdb733a
commit 3f232131a1

View file

@ -62,7 +62,7 @@
do { \
char buf_[1024]; \
snprintf(buf_, sizeof(buf_), __VA_ARGS__); \
fprintf(file, ANSI_BLUE "%s():%d - " ANSI_RED "%s" ANSI_NORMAL "\n", __func__, __LINE__, buf_); \
fprintf(file, ANSI_BLUE "%30s():%4d - " ANSI_RED "%s" ANSI_NORMAL "\n", __func__, __LINE__, buf_); \
} while (0)
#define trace(...) _trace(stdout, __VA_ARGS__)