mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
Add ERRORF macro for kLogError log level (#252)
This commit is contained in:
parent
8af197560e
commit
0ba3617e7f
1 changed files with 9 additions and 0 deletions
|
@ -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)) { \
|
||||
|
|
Loading…
Reference in a new issue