diff options
| author | Dan Engelbrecht <[email protected]> | 2023-04-25 14:50:29 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-25 14:50:29 +0200 |
| commit | 0d0697cbe19ed2ef385408f72d754cea99c7bc9a (patch) | |
| tree | 9d05fec6bf2356b56fa432e3e97946adacfc9466 /zencore/logging.cpp | |
| parent | 0.2.5 (diff) | |
| download | zen-0d0697cbe19ed2ef385408f72d754cea99c7bc9a.tar.xz zen-0d0697cbe19ed2ef385408f72d754cea99c7bc9a.zip | |
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
Diffstat (limited to 'zencore/logging.cpp')
| -rw-r--r-- | zencore/logging.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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<spdlog::logger> TheErrorLogger; + +spdlog::logger* +ErrorLog() +{ + return TheErrorLogger.get(); +} + +void +SetErrorLog(std::shared_ptr<spdlog::logger>&& NewErrorLogger) +{ + TheErrorLogger = std::move(NewErrorLogger); +} + void InitializeLogging() { |