aboutsummaryrefslogtreecommitdiff
path: root/src/common/Logging/Log.cpp
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-03-11 18:55:33 +0100
committerNaios <naios-dev@live.de>2016-03-11 18:55:33 +0100
commit998607b1067c453df0d1ad1a450d72faab5fd922 (patch)
tree2cbc52651395c451056605d4781d7e60e693512f /src/common/Logging/Log.cpp
parentd1efa0b8b1a553b184f884ad757bcebc913f117b (diff)
Core/Common: Move singleton instances into compilation units
* Fixes issues when building shared libraries (prevents gcc and clang from providing several instance) (cherry picked from commit 5c91586797f199259567629a1d4d3f987c73e53c)
Diffstat (limited to 'src/common/Logging/Log.cpp')
-rw-r--r--src/common/Logging/Log.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/Logging/Log.cpp b/src/common/Logging/Log.cpp
index a80a4671822..de2c02bf2ed 100644
--- a/src/common/Logging/Log.cpp
+++ b/src/common/Logging/Log.cpp
@@ -320,6 +320,12 @@ void Log::Close()
appenders.clear();
}
+Log* Log::instance()
+{
+ static Log instance;
+ return &instance;
+}
+
void Log::Initialize(boost::asio::io_service* ioService)
{
if (ioService)