Fix redbean latency and resource usage logging (#257)

This commit is contained in:
Paul Kulchenko 2021-08-22 20:16:10 -07:00 committed by GitHub
parent 7d25fb0090
commit 818926dbae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -72,6 +72,14 @@ extern unsigned __log_level; /* log level for runtime check */
((!__builtin_constant_p(LEVEL) || (LEVEL) <= LOGGABLELEVEL) && \
(LEVEL) <= __log_level)
// log a message with the specified log level (not checking if LOGGABLE)
#define ANYF(LEVEL, FMT, ...) \
do { \
++ftrace; \
flogf(LEVEL, __FILE__, __LINE__, NULL, FMT, ##__VA_ARGS__); \
--ftrace; \
} while (0)
// die with an error message without backtrace and debugger invocation
#define DIEF(FMT, ...) \
do { \