New log support.
This commit is contained in:
parent
17e9e036f1
commit
f43929db98
26 changed files with 96 additions and 198 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <inttypes.h>
|
||||
|
||||
|
||||
#include "base/io/log/Log.h"
|
||||
#include "common/config/ConfigLoader.h"
|
||||
#include "common/cpu/Cpu.h"
|
||||
#include "core/Config.h"
|
||||
|
@ -87,7 +88,7 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
|||
doc.AddMember("autosave", isAutoSave(), allocator);
|
||||
doc.AddMember("av", algoVariant(), allocator);
|
||||
doc.AddMember("background", isBackground(), allocator);
|
||||
doc.AddMember("colors", isColors(), allocator);
|
||||
doc.AddMember("colors", Log::colors, allocator);
|
||||
|
||||
if (affinity() != -1L) {
|
||||
snprintf(affinity_tmp, sizeof(affinity_tmp) - 1, "0x%" PRIX64, affinity());
|
||||
|
@ -123,13 +124,9 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
|||
doc.AddMember("threads", threadsCount(), allocator);
|
||||
}
|
||||
|
||||
doc.AddMember("user-agent", userAgent() ? Value(StringRef(userAgent())).Move() : Value(kNullType).Move(), allocator);
|
||||
|
||||
# ifdef HAVE_SYSLOG_H
|
||||
doc.AddMember("syslog", isSyslog(), allocator);
|
||||
# endif
|
||||
|
||||
doc.AddMember("watch", m_watch, allocator);
|
||||
doc.AddMember("user-agent", m_userAgent.toJSON(), allocator);
|
||||
doc.AddMember("syslog", isSyslog(), allocator);
|
||||
doc.AddMember("watch", m_watch, allocator);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ R"===(
|
|||
"cpu-affinity": null,
|
||||
"cpu-priority": null,
|
||||
"donate-level": 5,
|
||||
"donate-over-proxy": 1,
|
||||
"huge-pages": true,
|
||||
"hw-aes": null,
|
||||
"log-file": null,
|
||||
|
@ -73,7 +74,8 @@ R"===(
|
|||
"safe": false,
|
||||
"threads": null,
|
||||
"user-agent": null,
|
||||
"watch": false
|
||||
"syslog": false,
|
||||
"watch": true
|
||||
}
|
||||
)===";
|
||||
#endif
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
|
||||
#include "base/io/log/backends/ConsoleLog.h"
|
||||
#include "base/io/log/backends/FileLog.h"
|
||||
#include "base/io/log/Log.h"
|
||||
#include "common/config/ConfigLoader.h"
|
||||
#include "common/cpu/Cpu.h"
|
||||
#include "common/interfaces/IControllerListener.h"
|
||||
#include "common/log/Log.h"
|
||||
#include "common/Platform.h"
|
||||
#include "core/Config.h"
|
||||
#include "core/Controller.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue