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:
Paul Kulchenko 2021-08-22 15:01:52 -07:00 committed by GitHub
parent 00611e9b06
commit 41b9eb6873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 189 additions and 189 deletions

View file

@ -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