tlog: bump tlog to v1.6

This commit is contained in:
Nick Peng
2022-03-29 19:20:41 +08:00
parent 1fd18601e7
commit 1efa1942cc
2 changed files with 53 additions and 3 deletions

View File

@@ -78,7 +78,9 @@ level: Current log Levels
format: Log formats
*/
#ifndef BASE_FILE_NAME
#define BASE_FILE_NAME __FILE__
#define BASE_FILE_NAME \
(__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 \
: __FILE__)
#endif
#define tlog(level, format, ...) tlog_ext(level, BASE_FILE_NAME, __LINE__, __func__, NULL, format, ##__VA_ARGS__)