From 0d0697cbe19ed2ef385408f72d754cea99c7bc9a Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 25 Apr 2023 14:50:29 +0200 Subject: fix sentry report callstack (#256) * Include file, line and function in sentry log error messages * use sync direct error logger to get correct call stacks on error * changelog * use d1trimfile on windows to shorten file path on windows * constexpr -> consteval --- zencore/logging.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'zencore/logging.cpp') diff --git a/zencore/logging.cpp b/zencore/logging.cpp index c5c0b6446..a6423e2dc 100644 --- a/zencore/logging.cpp +++ b/zencore/logging.cpp @@ -55,6 +55,20 @@ ConsoleLog() return *ConLogger; } +std::shared_ptr TheErrorLogger; + +spdlog::logger* +ErrorLog() +{ + return TheErrorLogger.get(); +} + +void +SetErrorLog(std::shared_ptr&& NewErrorLogger) +{ + TheErrorLogger = std::move(NewErrorLogger); +} + void InitializeLogging() { -- cgit v1.2.3