fix: Log fatal force flush
Summary: Test Plan:
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user