aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-10-06 17:14:57 +0200
committerStefan Boberg <[email protected]>2021-10-06 17:17:11 +0200
commitf64b96182f30556252b13717452175373b0ae20b (patch)
tree71db2b1ed431b83c0440e77fc5641cd013657e9a
parentstructured cache: Added locking around large cache value updates to prevent r... (diff)
downloadzen-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
-rw-r--r--zenserver/diag/logging.cpp2
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);