mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Fix redbean latency and resource usage logging (#257)
This commit is contained in:
parent
7d25fb0090
commit
818926dbae
2 changed files with 11 additions and 3 deletions
|
@ -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 { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue