fix: Log fatal force flush

Summary:

Test Plan:
This commit is contained in:
icex2
2024-08-15 11:34:31 +02:00
parent 45d7a29cba
commit 14f534b993
2 changed files with 11 additions and 0 deletions

View File

@@ -192,6 +192,7 @@ include src/main/popnhook1/Module.mk
include src/main/popnio/Module.mk
include src/main/procmon/Module.mk
include src/main/pcbidgen/Module.mk
include src/main/sdk-hook/Module.mk
include src/main/sdvxhook/Module.mk
include src/main/sdvxhook2-cn/Module.mk
include src/main/sdvxhook2/Module.mk
@@ -280,6 +281,7 @@ $(zipdir)/iidx-09-to-12.zip: \
dist/iidx/iidxhook-10.conf \
dist/iidx/iidxhook-11.conf \
dist/iidx/iidxhook-12.conf \
dist/iidx/inject-09.xml \
dist/iidx/vefx.txt \
build/bin/indep-32/iidx-irbeat-patch.exe \
dist/iidx/iidx-irbeat-patch-09.bat \

View File

@@ -86,9 +86,18 @@
* @param ... Additional arguments according to the specified arguments in the
* printf format string
*/
// Additional empty log statement to trigger flush on some sinks.
// Otherwise, the last message might get lost
#define log_fatal(...) \
do { \
_bt_core_log_api.v1.fatal( \
LOG_MODULE, \
"%s:%d: function `%s'", \
__FILE__, \
__LINE__, \
__FUNCTION__); \
_bt_core_log_api.v1.fatal(LOG_MODULE, __VA_ARGS__); \
_bt_core_log_api.v1.fatal(LOG_MODULE, ""); \
abort(); \
} while (0)