mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-16 18:40:16 +00:00
Redbean log improvements (#256)
* Update log level for redbean messages for better log content * Add categories to redbean log messages * Reorganize Lua error logging for consistency * Replace perror logging with FATALF * Update server failure reporting to better identify response code * Replace `flogf` with DIEF logging for consistency
This commit is contained in:
parent
00611e9b06
commit
41b9eb6873
2 changed files with 189 additions and 189 deletions
|
@ -72,6 +72,15 @@ extern unsigned __log_level; /* log level for runtime check */
|
|||
((!__builtin_constant_p(LEVEL) || (LEVEL) <= LOGGABLELEVEL) && \
|
||||
(LEVEL) <= __log_level)
|
||||
|
||||
// die with an error message without backtrace and debugger invocation
|
||||
#define DIEF(FMT, ...) \
|
||||
do { \
|
||||
++ftrace; \
|
||||
flogf(kLogError, __FILE__, __LINE__, NULL, FMT, ##__VA_ARGS__); \
|
||||
exit(1); \
|
||||
unreachable; \
|
||||
} while (0)
|
||||
|
||||
#define FATALF(FMT, ...) \
|
||||
do { \
|
||||
++ftrace; \
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue