Add ERRORF macro for kLogError log level (#252)

This commit is contained in:
Paul Kulchenko 2021-08-19 04:14:08 -07:00 committed by GitHub
parent 8af197560e
commit 0ba3617e7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,6 +76,15 @@ extern unsigned __log_level; /* log level for runtime check */
unreachable; \
} while (0)
#define ERRORF(FMT, ...) \
do { \
if (LOGGABLE(kLogError)) { \
++ftrace; \
flogf(kLogError, __FILE__, __LINE__, NULL, FMT, ##__VA_ARGS__); \
--ftrace; \
} \
} while (0)
#define WARNF(FMT, ...) \
do { \
if (LOGGABLE(kLogWarn)) { \