Move logging code to common folder.

This commit is contained in:
XMRig 2018-04-20 18:54:58 +07:00
parent 98e7308597
commit 36a612af9a
22 changed files with 28 additions and 29 deletions

View file

@ -46,9 +46,9 @@ set(HEADERS
src/interfaces/IThread.h src/interfaces/IThread.h
src/interfaces/IWatcherListener.h src/interfaces/IWatcherListener.h
src/interfaces/IWorker.h src/interfaces/IWorker.h
src/log/ConsoleLog.h src/common/log/ConsoleLog.h
src/log/FileLog.h src/common/log/FileLog.h
src/log/Log.h src/common/log/Log.h
src/Mem.h src/Mem.h
src/net/Job.h src/net/Job.h
src/net/JobResult.h src/net/JobResult.h
@ -101,9 +101,9 @@ set(SOURCES
src/common/Platform.cpp src/common/Platform.cpp
src/core/Config.cpp src/core/Config.cpp
src/core/Controller.cpp src/core/Controller.cpp
src/log/ConsoleLog.cpp src/common/log/ConsoleLog.cpp
src/log/FileLog.cpp src/common/log/FileLog.cpp
src/log/Log.cpp src/common/log/Log.cpp
src/Mem.cpp src/Mem.cpp
src/net/Job.cpp src/net/Job.cpp
src/net/Network.cpp src/net/Network.cpp
@ -194,7 +194,7 @@ endif()
CHECK_INCLUDE_FILE (syslog.h HAVE_SYSLOG_H) CHECK_INCLUDE_FILE (syslog.h HAVE_SYSLOG_H)
if (HAVE_SYSLOG_H) if (HAVE_SYSLOG_H)
add_definitions(/DHAVE_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() endif()
if (NOT WITH_AEON) if (NOT WITH_AEON)

View file

@ -29,14 +29,12 @@
#include "api/Api.h" #include "api/Api.h"
#include "App.h" #include "App.h"
#include "common/Console.h" #include "common/Console.h"
#include "common/log/Log.h"
#include "common/Platform.h" #include "common/Platform.h"
#include "core/Config.h" #include "core/Config.h"
#include "core/Controller.h" #include "core/Controller.h"
#include "Cpu.h" #include "Cpu.h"
#include "crypto/CryptoNight.h" #include "crypto/CryptoNight.h"
#include "log/ConsoleLog.h"
#include "log/FileLog.h"
#include "log/Log.h"
#include "Mem.h" #include "Mem.h"
#include "net/Network.h" #include "net/Network.h"
#include "Summary.h" #include "Summary.h"

View file

@ -29,11 +29,11 @@
#include <tchar.h> #include <tchar.h>
#include "common/log/Log.h"
#include "common/utils/mm_malloc.h" #include "common/utils/mm_malloc.h"
#include "common/xmrig.h" #include "common/xmrig.h"
#include "crypto/CryptoNight.h" #include "crypto/CryptoNight.h"
#include "crypto/CryptoNight_constants.h" #include "crypto/CryptoNight_constants.h"
#include "log/Log.h"
#include "Mem.h" #include "Mem.h"

View file

@ -27,11 +27,11 @@
#include <uv.h> #include <uv.h>
#include "common/log/Log.h"
#include "common/net/Pool.h" #include "common/net/Pool.h"
#include "core/Config.h" #include "core/Config.h"
#include "core/Controller.h" #include "core/Controller.h"
#include "Cpu.h" #include "Cpu.h"
#include "log/Log.h"
#include "Mem.h" #include "Mem.h"
#include "Summary.h" #include "Summary.h"
#include "version.h" #include "version.h"

View file

@ -30,7 +30,7 @@
#include "common/api/Httpd.h" #include "common/api/Httpd.h"
#include "common/api/HttpReply.h" #include "common/api/HttpReply.h"
#include "common/api/HttpRequest.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) : Httpd::Httpd(int port, const char *accessToken, bool IPv6, bool restricted) :

View file

@ -30,8 +30,8 @@
#include "common/config/CommonConfig.h" #include "common/config/CommonConfig.h"
#include "common/log/Log.h"
#include "donate.h" #include "donate.h"
#include "log/Log.h"
#include "rapidjson/document.h" #include "rapidjson/document.h"
#include "rapidjson/filewritestream.h" #include "rapidjson/filewritestream.h"
#include "rapidjson/prettywriter.h" #include "rapidjson/prettywriter.h"

View file

@ -27,9 +27,9 @@
#include "common/config/ConfigLoader.h" #include "common/config/ConfigLoader.h"
#include "common/config/ConfigWatcher.h" #include "common/config/ConfigWatcher.h"
#include "common/log/Log.h"
#include "core/ConfigCreator.h" #include "core/ConfigCreator.h"
#include "interfaces/IWatcherListener.h" #include "interfaces/IWatcherListener.h"
#include "log/Log.h"
xmrig::ConfigWatcher::ConfigWatcher(const char *path, IConfigCreator *creator, IWatcherListener *listener) : xmrig::ConfigWatcher::ConfigWatcher(const char *path, IConfigCreator *creator, IWatcherListener *listener) :

View file

@ -183,7 +183,7 @@ void xmrig::keccak(const uint8_t *in, int inlen, uint8_t *md, int mdlen)
xmrig::keccakf(st, KECCAK_ROUNDS); xmrig::keccakf(st, KECCAK_ROUNDS);
} }
// last block and padding // last block and padding
memcpy(temp, in, inlen); memcpy(temp, in, inlen);
temp[inlen++] = 1; temp[inlen++] = 1;

View file

@ -34,10 +34,10 @@
#endif #endif
#include "common/log/ConsoleLog.h"
#include "common/log/Log.h"
#include "core/Config.h" #include "core/Config.h"
#include "core/Controller.h" #include "core/Controller.h"
#include "log/ConsoleLog.h"
#include "log/Log.h"
ConsoleLog::ConsoleLog(xmrig::Controller *controller) : ConsoleLog::ConsoleLog(xmrig::Controller *controller) :

View file

@ -29,7 +29,7 @@
#include <time.h> #include <time.h>
#include "log/FileLog.h" #include "common/log/FileLog.h"
FileLog::FileLog(const char *fileName) FileLog::FileLog(const char *fileName)

View file

@ -29,8 +29,8 @@
#include <time.h> #include <time.h>
#include "common/log/Log.h"
#include "interfaces/ILogBackend.h" #include "interfaces/ILogBackend.h"
#include "log/Log.h"
Log *Log::m_self = nullptr; Log *Log::m_self = nullptr;

View file

@ -25,7 +25,7 @@
#include <syslog.h> #include <syslog.h>
#include "log/SysLog.h" #include "common/log/SysLog.h"
#include "version.h" #include "version.h"

View file

@ -29,9 +29,9 @@
#include <utility> #include <utility>
#include "common/log/Log.h"
#include "common/net/Client.h" #include "common/net/Client.h"
#include "interfaces/IClientListener.h" #include "interfaces/IClientListener.h"
#include "log/Log.h"
#include "rapidjson/document.h" #include "rapidjson/document.h"
#include "rapidjson/error/en.h" #include "rapidjson/error/en.h"
#include "rapidjson/stringbuffer.h" #include "rapidjson/stringbuffer.h"

View file

@ -28,7 +28,8 @@
#include <assert.h> #include <assert.h>
#include <map> #include <map>
#include "log/Log.h"
#include "common/log/Log.h"
namespace xmrig { namespace xmrig {

View file

@ -26,14 +26,14 @@
#include "common/config/ConfigLoader.h" #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 "common/Platform.h"
#include "core/Config.h" #include "core/Config.h"
#include "core/Controller.h" #include "core/Controller.h"
#include "Cpu.h" #include "Cpu.h"
#include "interfaces/IControllerListener.h" #include "interfaces/IControllerListener.h"
#include "log/ConsoleLog.h"
#include "log/FileLog.h"
#include "log/Log.h"
#include "net/Network.h" #include "net/Network.h"

View file

@ -31,13 +31,13 @@
#include "api/Api.h" #include "api/Api.h"
#include "common/log/Log.h"
#include "common/net/Client.h" #include "common/net/Client.h"
#include "common/net/strategies/FailoverStrategy.h" #include "common/net/strategies/FailoverStrategy.h"
#include "common/net/strategies/SinglePoolStrategy.h" #include "common/net/strategies/SinglePoolStrategy.h"
#include "common/net/SubmitResult.h" #include "common/net/SubmitResult.h"
#include "core/Config.h" #include "core/Config.h"
#include "core/Controller.h" #include "core/Controller.h"
#include "log/Log.h"
#include "net/Network.h" #include "net/Network.h"
#include "net/strategies/DonateStrategy.h" #include "net/strategies/DonateStrategy.h"
#include "workers/Workers.h" #include "workers/Workers.h"

View file

@ -29,9 +29,9 @@
#include <stdio.h> #include <stdio.h>
#include "common/log/Log.h"
#include "core/Config.h" #include "core/Config.h"
#include "core/Controller.h" #include "core/Controller.h"
#include "log/Log.h"
#include "workers/Hashrate.h" #include "workers/Hashrate.h"

View file

@ -26,12 +26,12 @@
#include "api/Api.h" #include "api/Api.h"
#include "common/log/Log.h"
#include "core/Config.h" #include "core/Config.h"
#include "core/Controller.h" #include "core/Controller.h"
#include "crypto/CryptoNight_constants.h" #include "crypto/CryptoNight_constants.h"
#include "interfaces/IJobResultListener.h" #include "interfaces/IJobResultListener.h"
#include "interfaces/IThread.h" #include "interfaces/IThread.h"
#include "log/Log.h"
#include "Mem.h" #include "Mem.h"
#include "rapidjson/document.h" #include "rapidjson/document.h"
#include "workers/Handle.h" #include "workers/Handle.h"