aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-02-04 14:26:02 -0500
committerMarcoFalke <falke.marco@gmail.com>2019-02-04 14:26:07 -0500
commit452acee4da206eb8792505914fd92245246b2290 (patch)
treeff6ee5e55cc96bd3f7b20a2669d547e4657920ca /src/interfaces
parentbfbe42585e9b9a77623a95df54ec76adf91fccea (diff)
parent77777c5624e2f5416d85500e82b7c80e10ed01b6 (diff)
Merge #15266: memory: Construct globals on first use
77777c5624 log: Construct global logger on first use (MarcoFalke) Pull request description: The (de)initialization order is not well defined in C++, so generally it is not safe to use globals as the (de/con)structor of one global could use the (de/con)structor of another global before/after it has been (con/de)structed. Specifically this fixes: * `g_logger` might not be initialized on the first use, so do that. (Fixes #15111) Tree-SHA512: eb9c22f4baf31ebc5b0b9ee6a51d1354bae1f0df186cc0ce818b4483c7b5a7f90268d2b549ee96b4c57f8ef36ab239dc6497f74f3e2ef166038f7437c368297d
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index c574f960e6..a2b89c3f90 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -67,7 +67,7 @@ public:
void initLogging() override { InitLogging(); }
void initParameterInteraction() override { InitParameterInteraction(); }
std::string getWarnings(const std::string& type) override { return GetWarnings(type); }
- uint32_t getLogCategories() override { return g_logger->GetCategoryMask(); }
+ uint32_t getLogCategories() override { return LogInstance().GetCategoryMask(); }
bool baseInitialize() override
{
return AppInitBasicSetup() && AppInitParameterInteraction() && AppInitSanityChecks() &&