diff options
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | zencore/include/zencore/logging.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e8da122a2..cb8051158 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## - Bugfix: Verify that there are blocks to GC for block store garbage collect (void division by zero) +- Bugfix: Write log error and flush log before reporting error to Sentry/error logger - Bugfix: Log ERROR in scope guard if function throws exception, throwing exception causes application abort ## 0.2.7 diff --git a/zencore/include/zencore/logging.h b/zencore/include/zencore/logging.h index 44e3d40d4..5cbe034cf 100644 --- a/zencore/include/zencore/logging.h +++ b/zencore/include/zencore/logging.h @@ -67,6 +67,7 @@ LogIsErrorLevel(int level) using namespace std::literals; \ if (logger.should_log(level)) \ { \ + logger.log(loc, level, fmtstr, ##__VA_ARGS__); \ if (LogIsErrorLevel(level)) \ { \ if (auto ErrLogger = zen::logging::ErrorLog(); ErrLogger != nullptr) \ @@ -74,7 +75,6 @@ LogIsErrorLevel(int level) ErrLogger->log(loc, level, fmtstr, ##__VA_ARGS__); \ } \ } \ - logger.log(loc, level, fmtstr, ##__VA_ARGS__); \ } \ } while (false); |