core: Make logger thread-safe

Change-Id: Ic45dc0912da9c2e3f074d3f74921bfe33741bf63
Refs: #2489
diff --git a/core/logger.cpp b/core/logger.cpp
index 5ba8c39..3a9da61 100644
--- a/core/logger.cpp
+++ b/core/logger.cpp
@@ -36,6 +36,8 @@
 
 namespace nfd {
 
+std::mutex g_logMutex;
+
 Logger::Logger(const std::string& name, LogLevel level)
   : m_moduleName(name)
   , m_enabledLogLevel(level)