diff options
| author | Stefan Boberg <[email protected]> | 2021-10-06 17:14:57 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-06 17:17:11 +0200 |
| commit | f64b96182f30556252b13717452175373b0ae20b (patch) | |
| tree | 71db2b1ed431b83c0440e77fc5641cd013657e9a /zenserver/diag/logging.cpp | |
| parent | structured cache: Added locking around large cache value updates to prevent r... (diff) | |
| download | zen-f64b96182f30556252b13717452175373b0ae20b.tar.xz zen-f64b96182f30556252b13717452175373b0ae20b.zip | |
Only enable the MSVC debug output sink for sessions when the --debug mode is enabled
Previously it would always be enabled if an attached debugger was detected but it impacts performance quite severely so now it is opt-in
Diffstat (limited to 'zenserver/diag/logging.cpp')
| -rw-r--r-- | zenserver/diag/logging.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zenserver/diag/logging.cpp b/zenserver/diag/logging.cpp index 8cec7ddc9..7a7773cba 100644 --- a/zenserver/diag/logging.cpp +++ b/zenserver/diag/logging.cpp @@ -251,7 +251,7 @@ InitializeLogging(const ZenServerOptions& GlobalOptions) Sinks.push_back(FileSink); #if ZEN_PLATFORM_WINDOWS - if (zen::IsDebuggerPresent()) + if (zen::IsDebuggerPresent() && GlobalOptions.IsDebug) { auto DebugSink = std::make_shared<spdlog::sinks::msvc_sink_mt>(); DebugSink->set_level(spdlog::level::debug); |