mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-09 00:33:33 -05:00
Use long tags.
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "backend/cuda/wrappers/CudaDevice.h"
|
||||
#include "backend/cuda/wrappers/CudaLib.h"
|
||||
#include "base/io/log/Log.h"
|
||||
#include "base/io/log/Tags.h"
|
||||
#include "base/net/stratum/Job.h"
|
||||
#include "base/tools/Chrono.h"
|
||||
#include "base/tools/String.h"
|
||||
@@ -71,7 +72,6 @@ extern template class Threads<CudaThreads>;
|
||||
|
||||
constexpr const size_t oneMiB = 1024U * 1024U;
|
||||
static const char *kLabel = "CUDA";
|
||||
static const char *tag = GREEN_BG_BOLD(WHITE_BOLD_S " nv ");
|
||||
static const String kType = "cuda";
|
||||
static std::mutex mutex;
|
||||
|
||||
@@ -107,13 +107,13 @@ public:
|
||||
inline void print() const
|
||||
{
|
||||
if (m_started == 0) {
|
||||
LOG_ERR("%s " RED_BOLD("disabled") YELLOW(" (failed to start threads)"), tag);
|
||||
LOG_ERR("%s " RED_BOLD("disabled") YELLOW(" (failed to start threads)"), Tags::nvidia());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_INFO("%s" GREEN_BOLD(" READY") " threads " "%s%zu/%zu" BLACK_BOLD(" (%" PRIu64 " ms)"),
|
||||
tag,
|
||||
Tags::nvidia(),
|
||||
m_errors == 0 ? CYAN_BOLD_S : YELLOW_BOLD_S,
|
||||
m_started,
|
||||
m_threads,
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
inline void start(const Job &)
|
||||
{
|
||||
LOG_INFO("%s use profile " BLUE_BG(WHITE_BOLD_S " %s ") WHITE_BOLD_S " (" CYAN_BOLD("%zu") WHITE_BOLD(" thread%s)") " scratchpad " CYAN_BOLD("%zu KB"),
|
||||
tag,
|
||||
Tags::nvidia(),
|
||||
profileName.data(),
|
||||
threads.size(),
|
||||
threads.size() > 1 ? "s" : "",
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
}
|
||||
|
||||
LOG_INFO("%s" CYAN_BOLD(" #%u") YELLOW(" %s") MAGENTA_BOLD("%4uW") CSI "1;%um %2uC" CLEAR WHITE_BOLD("%s") "%s",
|
||||
tag,
|
||||
Tags::nvidia(),
|
||||
device.index(),
|
||||
device.topology().toString().data(),
|
||||
health.power,
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
|
||||
const char *xmrig::cuda_tag()
|
||||
{
|
||||
return tag;
|
||||
return Tags::nvidia();
|
||||
}
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ void xmrig::CudaBackend::setJob(const Job &job)
|
||||
d_ptr->profileName = cuda.threads().profileName(job.algorithm());
|
||||
|
||||
if (d_ptr->profileName.isNull() || threads.empty()) {
|
||||
LOG_WARN("%s " RED_BOLD("disabled") YELLOW(" (no suitable configuration found)"), tag);
|
||||
LOG_WARN("%s " RED_BOLD("disabled") YELLOW(" (no suitable configuration found)"), Tags::nvidia());
|
||||
|
||||
return stop();
|
||||
}
|
||||
@@ -465,7 +465,7 @@ void xmrig::CudaBackend::stop()
|
||||
d_ptr->workers.stop();
|
||||
d_ptr->threads.clear();
|
||||
|
||||
LOG_INFO("%s" YELLOW(" stopped") BLACK_BOLD(" (%" PRIu64 " ms)"), tag, Chrono::steadyMSecs() - ts);
|
||||
LOG_INFO("%s" YELLOW(" stopped") BLACK_BOLD(" (%" PRIu64 " ms)"), Tags::nvidia(), Chrono::steadyMSecs() - ts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user