From 3cc8b19ca00191241fedfbec152df0b1c787444d Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 17 Dec 2019 22:03:50 +0700 Subject: [PATCH] Added command line option --verbose. --- README.md | 1 + src/base/kernel/config/BaseTransform.cpp | 4 ++++ src/core/config/Config_platform.h | 1 + src/core/config/usage.h | 1 + 4 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 7ed04212f..58c76659b 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ Logging: --print-time=N print hashrate report every N seconds --health-print-time=N print health report every N seconds --no-color disable colored output + --verbose verbose output Misc: -c, --config=FILE load a JSON-format configuration file diff --git a/src/base/kernel/config/BaseTransform.cpp b/src/base/kernel/config/BaseTransform.cpp index ccf5ccf11..8a3a140ec 100644 --- a/src/base/kernel/config/BaseTransform.cpp +++ b/src/base/kernel/config/BaseTransform.cpp @@ -222,6 +222,7 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch case IConfig::DryRunKey: /* --dry-run */ case IConfig::HttpEnabledKey: /* --http-enabled */ case IConfig::DaemonKey: /* --daemon */ + case IConfig::VerboseKey: /* --verbose */ return transformBoolean(doc, key, true); case IConfig::ColorKey: /* --no-color */ @@ -273,6 +274,9 @@ void xmrig::BaseTransform::transformBoolean(rapidjson::Document &doc, int key, b case IConfig::DryRunKey: /* --dry-run */ return set(doc, "dry-run", enable); + case IConfig::VerboseKey: /* --verbose */ + return set(doc, "verbose", enable); + default: break; } diff --git a/src/core/config/Config_platform.h b/src/core/config/Config_platform.h index 14ae5b2e0..2a1725e3d 100644 --- a/src/core/config/Config_platform.h +++ b/src/core/config/Config_platform.h @@ -87,6 +87,7 @@ static const option options[] = { { "cpu-max-threads-hint", 1, nullptr, IConfig::CPUMaxThreadsKey }, { "cpu-memory-pool", 1, nullptr, IConfig::MemoryPoolKey }, { "cpu-no-yield", 0, nullptr, IConfig::YieldKey }, + { "verbose", 0, nullptr, IConfig::VerboseKey }, # ifdef XMRIG_FEATURE_TLS { "tls", 0, nullptr, IConfig::TlsKey }, { "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey }, diff --git a/src/core/config/usage.h b/src/core/config/usage.h index 27edee3d2..4fb62a48c 100644 --- a/src/core/config/usage.h +++ b/src/core/config/usage.h @@ -136,6 +136,7 @@ static inline const std::string &usage() u += " --health-print-time=N print health report every N seconds\n"; # endif u += " --no-color disable colored output\n"; + u += " --verbose verbose output\n"; u += "\nMisc:\n";