aboutsummaryrefslogtreecommitdiff
path: root/zenserver/diag/logging.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-04-19 10:43:28 +0200
committerStefan Boberg <[email protected]>2023-04-19 10:52:48 +0200
commit9fb9d6ce5aaedd4ecf4f7bdc9c33a94b1e6597b2 (patch)
tree924c8ede64e087a5bdfeeb87862bc08e325f4ddc /zenserver/diag/logging.cpp
parentadded missing #pragma once (diff)
downloadzen-9fb9d6ce5aaedd4ecf4f7bdc9c33a94b1e6597b2.tar.xz
zen-9fb9d6ce5aaedd4ecf4f7bdc9c33a94b1e6597b2.zip
tweaks for enabling unity builds
mostly changes to make sure anonymous namespaces don't clash and a change to avoid windows headers from leaking into other compilation units unity builds are not yet enabled by default, but can be enabled by uncommenting this line in the root `xmake.lua` ``` --add_rules("c++.unity_build") ```
Diffstat (limited to 'zenserver/diag/logging.cpp')
-rw-r--r--zenserver/diag/logging.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/zenserver/diag/logging.cpp b/zenserver/diag/logging.cpp
index 1a8b427ca..ca569c467 100644
--- a/zenserver/diag/logging.cpp
+++ b/zenserver/diag/logging.cpp
@@ -326,7 +326,6 @@ private:
memory_buf_t m_CachedDatetime;
std::string m_LogId;
};
-} // namespace logging
bool
EnableVTMode()
@@ -355,6 +354,8 @@ EnableVTMode()
return true;
}
+} // namespace logging
+
#if ZEN_USE_SENTRY
class sentry_sink final : public spdlog::sinks::base_sink<spdlog::details::null_mutex>
@@ -391,8 +392,7 @@ void
InitializeLogging(const ZenServerOptions& GlobalOptions)
{
zen::logging::InitializeLogging();
-
- EnableVTMode();
+ logging::EnableVTMode();
bool IsAsync = true;
spdlog::level::level_enum LogLevel = spdlog::level::info;