New log support.

This commit is contained in:
XMRig 2019-03-27 01:29:37 +07:00
parent 17e9e036f1
commit f43929db98
26 changed files with 96 additions and 198 deletions

View file

@ -30,8 +30,8 @@
#include <stdio.h>
#include "base/io/log/Log.h"
#include "base/tools/Handle.h"
#include "common/log/Log.h"
#include "core/Config.h"
#include "core/Controller.h"
#include "workers/Hashrate.h"
@ -163,8 +163,7 @@ void Hashrate::print() const
char num3[8] = { 0 };
char num4[8] = { 0 };
LOG_INFO(m_controller->config()->isColors() ? WHITE_BOLD("speed") " 10s/60s/15m " CYAN_BOLD("%s") CYAN(" %s %s ") CYAN_BOLD("H/s") " max " CYAN_BOLD("%s H/s")
: "speed 10s/60s/15m %s %s %s H/s max %s H/s",
LOG_INFO(WHITE_BOLD("speed") " 10s/60s/15m " CYAN_BOLD("%s") CYAN(" %s %s ") CYAN_BOLD("H/s") " max " CYAN_BOLD("%s H/s"),
format(calc(ShortInterval), num1, sizeof(num1)),
format(calc(MediumInterval), num2, sizeof(num2)),
format(calc(LargeInterval), num3, sizeof(num3)),