diff --git a/CMakeLists.txt b/CMakeLists.txt index 06f0bef9..e6c2d2d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,9 +46,9 @@ set(HEADERS src/interfaces/IThread.h src/interfaces/IWatcherListener.h src/interfaces/IWorker.h - src/log/ConsoleLog.h - src/log/FileLog.h - src/log/Log.h + src/common/log/ConsoleLog.h + src/common/log/FileLog.h + src/common/log/Log.h src/Mem.h src/net/Job.h src/net/JobResult.h @@ -101,9 +101,9 @@ set(SOURCES src/common/Platform.cpp src/core/Config.cpp src/core/Controller.cpp - src/log/ConsoleLog.cpp - src/log/FileLog.cpp - src/log/Log.cpp + src/common/log/ConsoleLog.cpp + src/common/log/FileLog.cpp + src/common/log/Log.cpp src/Mem.cpp src/net/Job.cpp src/net/Network.cpp @@ -194,7 +194,7 @@ endif() CHECK_INCLUDE_FILE (syslog.h HAVE_SYSLOG_H) if (HAVE_SYSLOG_H) add_definitions(/DHAVE_SYSLOG_H) - set(SOURCES_SYSLOG src/log/SysLog.h src/log/SysLog.cpp) + set(SOURCES_SYSLOG src/common/log/SysLog.h src/common/log/SysLog.cpp) endif() if (NOT WITH_AEON) diff --git a/src/App.cpp b/src/App.cpp index e7447634..adcc5752 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -29,14 +29,12 @@ #include "api/Api.h" #include "App.h" #include "common/Console.h" +#include "common/log/Log.h" #include "common/Platform.h" #include "core/Config.h" #include "core/Controller.h" #include "Cpu.h" #include "crypto/CryptoNight.h" -#include "log/ConsoleLog.h" -#include "log/FileLog.h" -#include "log/Log.h" #include "Mem.h" #include "net/Network.h" #include "Summary.h" diff --git a/src/Mem_win.cpp b/src/Mem_win.cpp index 9a81b039..2bfcc3b0 100644 --- a/src/Mem_win.cpp +++ b/src/Mem_win.cpp @@ -29,11 +29,11 @@ #include +#include "common/log/Log.h" #include "common/utils/mm_malloc.h" #include "common/xmrig.h" #include "crypto/CryptoNight.h" #include "crypto/CryptoNight_constants.h" -#include "log/Log.h" #include "Mem.h" diff --git a/src/Summary.cpp b/src/Summary.cpp index 12108d18..38ceac8e 100644 --- a/src/Summary.cpp +++ b/src/Summary.cpp @@ -27,11 +27,11 @@ #include +#include "common/log/Log.h" #include "common/net/Pool.h" #include "core/Config.h" #include "core/Controller.h" #include "Cpu.h" -#include "log/Log.h" #include "Mem.h" #include "Summary.h" #include "version.h" diff --git a/src/common/api/Httpd.cpp b/src/common/api/Httpd.cpp index 135ac7c9..0cab01bf 100644 --- a/src/common/api/Httpd.cpp +++ b/src/common/api/Httpd.cpp @@ -30,7 +30,7 @@ #include "common/api/Httpd.h" #include "common/api/HttpReply.h" #include "common/api/HttpRequest.h" -#include "log/Log.h" +#include "common/log/Log.h" Httpd::Httpd(int port, const char *accessToken, bool IPv6, bool restricted) : diff --git a/src/common/config/CommonConfig.cpp b/src/common/config/CommonConfig.cpp index 7327b50c..75906621 100644 --- a/src/common/config/CommonConfig.cpp +++ b/src/common/config/CommonConfig.cpp @@ -30,8 +30,8 @@ #include "common/config/CommonConfig.h" +#include "common/log/Log.h" #include "donate.h" -#include "log/Log.h" #include "rapidjson/document.h" #include "rapidjson/filewritestream.h" #include "rapidjson/prettywriter.h" diff --git a/src/common/config/ConfigWatcher.cpp b/src/common/config/ConfigWatcher.cpp index 21d73188..a08b2be7 100644 --- a/src/common/config/ConfigWatcher.cpp +++ b/src/common/config/ConfigWatcher.cpp @@ -27,9 +27,9 @@ #include "common/config/ConfigLoader.h" #include "common/config/ConfigWatcher.h" +#include "common/log/Log.h" #include "core/ConfigCreator.h" #include "interfaces/IWatcherListener.h" -#include "log/Log.h" xmrig::ConfigWatcher::ConfigWatcher(const char *path, IConfigCreator *creator, IWatcherListener *listener) : diff --git a/src/common/crypto/keccak.cpp b/src/common/crypto/keccak.cpp index ecfe7700..0219ce36 100644 --- a/src/common/crypto/keccak.cpp +++ b/src/common/crypto/keccak.cpp @@ -183,7 +183,7 @@ void xmrig::keccak(const uint8_t *in, int inlen, uint8_t *md, int mdlen) xmrig::keccakf(st, KECCAK_ROUNDS); } - + // last block and padding memcpy(temp, in, inlen); temp[inlen++] = 1; diff --git a/src/log/ConsoleLog.cpp b/src/common/log/ConsoleLog.cpp similarity index 98% rename from src/log/ConsoleLog.cpp rename to src/common/log/ConsoleLog.cpp index eeed7355..b7d187d1 100644 --- a/src/log/ConsoleLog.cpp +++ b/src/common/log/ConsoleLog.cpp @@ -34,10 +34,10 @@ #endif +#include "common/log/ConsoleLog.h" +#include "common/log/Log.h" #include "core/Config.h" #include "core/Controller.h" -#include "log/ConsoleLog.h" -#include "log/Log.h" ConsoleLog::ConsoleLog(xmrig::Controller *controller) : diff --git a/src/log/ConsoleLog.h b/src/common/log/ConsoleLog.h similarity index 100% rename from src/log/ConsoleLog.h rename to src/common/log/ConsoleLog.h diff --git a/src/log/FileLog.cpp b/src/common/log/FileLog.cpp similarity index 98% rename from src/log/FileLog.cpp rename to src/common/log/FileLog.cpp index 5eeb252c..c8eaf5f7 100644 --- a/src/log/FileLog.cpp +++ b/src/common/log/FileLog.cpp @@ -29,7 +29,7 @@ #include -#include "log/FileLog.h" +#include "common/log/FileLog.h" FileLog::FileLog(const char *fileName) diff --git a/src/log/FileLog.h b/src/common/log/FileLog.h similarity index 100% rename from src/log/FileLog.h rename to src/common/log/FileLog.h diff --git a/src/log/Log.cpp b/src/common/log/Log.cpp similarity index 98% rename from src/log/Log.cpp rename to src/common/log/Log.cpp index 0e38634d..03237f03 100644 --- a/src/log/Log.cpp +++ b/src/common/log/Log.cpp @@ -29,8 +29,8 @@ #include +#include "common/log/Log.h" #include "interfaces/ILogBackend.h" -#include "log/Log.h" Log *Log::m_self = nullptr; diff --git a/src/log/Log.h b/src/common/log/Log.h similarity index 100% rename from src/log/Log.h rename to src/common/log/Log.h diff --git a/src/log/SysLog.cpp b/src/common/log/SysLog.cpp similarity index 97% rename from src/log/SysLog.cpp rename to src/common/log/SysLog.cpp index f9b16cca..70879c33 100644 --- a/src/log/SysLog.cpp +++ b/src/common/log/SysLog.cpp @@ -25,7 +25,7 @@ #include -#include "log/SysLog.h" +#include "common/log/SysLog.h" #include "version.h" diff --git a/src/log/SysLog.h b/src/common/log/SysLog.h similarity index 100% rename from src/log/SysLog.h rename to src/common/log/SysLog.h diff --git a/src/common/net/Client.cpp b/src/common/net/Client.cpp index c335634b..2c28c89a 100644 --- a/src/common/net/Client.cpp +++ b/src/common/net/Client.cpp @@ -29,9 +29,9 @@ #include +#include "common/log/Log.h" #include "common/net/Client.h" #include "interfaces/IClientListener.h" -#include "log/Log.h" #include "rapidjson/document.h" #include "rapidjson/error/en.h" #include "rapidjson/stringbuffer.h" diff --git a/src/common/net/Storage.h b/src/common/net/Storage.h index 105547ec..752e9512 100644 --- a/src/common/net/Storage.h +++ b/src/common/net/Storage.h @@ -28,7 +28,8 @@ #include #include -#include "log/Log.h" + +#include "common/log/Log.h" namespace xmrig { diff --git a/src/core/Controller.cpp b/src/core/Controller.cpp index 5f0a9bb3..d0babe47 100644 --- a/src/core/Controller.cpp +++ b/src/core/Controller.cpp @@ -26,14 +26,14 @@ #include "common/config/ConfigLoader.h" +#include "common/log/ConsoleLog.h" +#include "common/log/FileLog.h" +#include "common/log/Log.h" #include "common/Platform.h" #include "core/Config.h" #include "core/Controller.h" #include "Cpu.h" #include "interfaces/IControllerListener.h" -#include "log/ConsoleLog.h" -#include "log/FileLog.h" -#include "log/Log.h" #include "net/Network.h" diff --git a/src/net/Network.cpp b/src/net/Network.cpp index 1fe02a35..5f6d73ee 100644 --- a/src/net/Network.cpp +++ b/src/net/Network.cpp @@ -31,13 +31,13 @@ #include "api/Api.h" +#include "common/log/Log.h" #include "common/net/Client.h" #include "common/net/strategies/FailoverStrategy.h" #include "common/net/strategies/SinglePoolStrategy.h" #include "common/net/SubmitResult.h" #include "core/Config.h" #include "core/Controller.h" -#include "log/Log.h" #include "net/Network.h" #include "net/strategies/DonateStrategy.h" #include "workers/Workers.h" diff --git a/src/workers/Hashrate.cpp b/src/workers/Hashrate.cpp index 7d2e6a4c..60d3a6a2 100644 --- a/src/workers/Hashrate.cpp +++ b/src/workers/Hashrate.cpp @@ -29,9 +29,9 @@ #include +#include "common/log/Log.h" #include "core/Config.h" #include "core/Controller.h" -#include "log/Log.h" #include "workers/Hashrate.h" diff --git a/src/workers/Workers.cpp b/src/workers/Workers.cpp index 25e1d068..1d2c1739 100644 --- a/src/workers/Workers.cpp +++ b/src/workers/Workers.cpp @@ -26,12 +26,12 @@ #include "api/Api.h" +#include "common/log/Log.h" #include "core/Config.h" #include "core/Controller.h" #include "crypto/CryptoNight_constants.h" #include "interfaces/IJobResultListener.h" #include "interfaces/IThread.h" -#include "log/Log.h" #include "Mem.h" #include "rapidjson/document.h" #include "workers/Handle.h"