aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-04-27 14:45:34 +0200
committerDan Engelbrecht <[email protected]>2023-04-27 14:45:34 +0200
commit362b3650bdc28beee33324328f3b5602dadf9105 (patch)
tree0d0126f99a696e722b77e8a1e92a38e0f772d027 /zencore/include
parentmade Ref<> constructor explicit (#262) (diff)
downloadzen-362b3650bdc28beee33324328f3b5602dadf9105.tar.xz
zen-362b3650bdc28beee33324328f3b5602dadf9105.zip
Write log error and flush log before reporting error to Sentry/error logger
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/logging.h2
1 files changed, 1 insertions, 1 deletions
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);