summary refs log tree commit diff
path: root/src/Logging.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-14 02:28:35 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-14 02:28:35 +0300
commit8e9d210a2a2136d1d517645b2b2412b15da09360 (patch)
treeb58bd7b236e9759bbc4b310ebffb0687f89db47d /src/Logging.cpp
parentAdd support for sending encrypted messages (diff)
downloadnheko-8e9d210a2a2136d1d517645b2b2412b15da09360.tar.xz
Rename the log namespace to avoid symbol clash with the math function
- Patch the olm repo with a CMakeLists.txt file
Diffstat (limited to 'src/Logging.cpp')
-rw-r--r--src/Logging.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Logging.cpp b/src/Logging.cpp
index 77e61e09..bccbe389 100644
--- a/src/Logging.cpp
+++ b/src/Logging.cpp
@@ -7,13 +7,13 @@ namespace {
 std::shared_ptr<spdlog::logger> db_logger     = nullptr;
 std::shared_ptr<spdlog::logger> net_logger    = nullptr;
 std::shared_ptr<spdlog::logger> crypto_logger = nullptr;
-std::shared_ptr<spdlog::logger> main_logger   = nullptr;
+std::shared_ptr<spdlog::logger> ui_logger     = nullptr;
 
 constexpr auto MAX_FILE_SIZE = 1024 * 1024 * 6;
 constexpr auto MAX_LOG_FILES = 3;
 }
 
-namespace log {
+namespace nhlog {
 void
 init(const std::string &file_path)
 {
@@ -26,17 +26,17 @@ init(const std::string &file_path)
         sinks.push_back(file_sink);
         sinks.push_back(console_sink);
 
-        net_logger  = std::make_shared<spdlog::logger>("net", std::begin(sinks), std::end(sinks));
-        main_logger = std::make_shared<spdlog::logger>("main", std::begin(sinks), std::end(sinks));
-        db_logger   = std::make_shared<spdlog::logger>("db", std::begin(sinks), std::end(sinks));
+        net_logger = std::make_shared<spdlog::logger>("net", std::begin(sinks), std::end(sinks));
+        ui_logger  = std::make_shared<spdlog::logger>("ui", std::begin(sinks), std::end(sinks));
+        db_logger  = std::make_shared<spdlog::logger>("db", std::begin(sinks), std::end(sinks));
         crypto_logger =
           std::make_shared<spdlog::logger>("crypto", std::begin(sinks), std::end(sinks));
 }
 
 std::shared_ptr<spdlog::logger>
-main()
+ui()
 {
-        return main_logger;
+        return ui_logger;
 }
 
 std::shared_ptr<spdlog::logger>