feat(ExceptionHandler): Force logs syncronously (#1317)

Closes #1303
This commit is contained in:
Andreas Maerten 2023-05-02 00:07:36 +02:00 committed by GitHub
parent 71892a6fa7
commit 10ebcbbdaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View File

@ -1,12 +1,12 @@
include(FetchContent) include(FetchContent)
message("AsyncLogger") message("AsyncLogger")
FetchContent_Declare( FetchContent_Declare(
AsyncLogger AsyncLogger
GIT_REPOSITORY https://github.com/Yimura/AsyncLogger.git GIT_REPOSITORY https://github.com/Yimura/AsyncLogger.git
GIT_TAG v0.0.5 GIT_TAG v0.0.6
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
FetchContent_MakeAvailable(AsyncLogger) FetchContent_MakeAvailable(AsyncLogger)
set_property(TARGET AsyncLogger PROPERTY CXX_STANDARD 23) set_property(TARGET AsyncLogger PROPERTY CXX_STANDARD 23)

View File

@ -40,6 +40,7 @@ namespace big
if (const auto it = logged_exceptions.find(trace_hash); it == logged_exceptions.end()) if (const auto it = logged_exceptions.find(trace_hash); it == logged_exceptions.end())
{ {
LOG(FATAL) << trace; LOG(FATAL) << trace;
Logger::FlushQueue();
logged_exceptions.insert(trace_hash); logged_exceptions.insert(trace_hash);
} }