Improve logging output

This commit is contained in:
Piotr Krygier committed 2023-09-26 14:15:21 +02:00
1 parent 7ca73f3c60
commit 3a58bd8756
3 files changed
+6 -5

No files matched your search

+3 -2
View File
@@ -17,9 +17,10 @@
#endif
#include <stdio.h>
#include <string.h>
#define LOGGER(log_level, ...) _log_log(log_level, __FILE__, __LINE__, __VA_ARGS__)
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#define LOGGER(log_level, ...) _log_log(log_level, __FILENAME__, __LINE__, __VA_ARGS__)
// #define LOGGER(log_level, ...) printf("[##log_level] %s:%d", __FILE__, __LINE__); printf(__VA_ARGS__)
#define LOGT(...) LOGGER(LOGLEVEL_TRACE, __VA_ARGS__)