Adjust console output.

This commit is contained in:
XMRig 2017-06-20 00:55:55 +03:00
parent 9bfa49b7d0
commit a791bc113e
3 changed files with 5 additions and 5 deletions

View file

@ -48,10 +48,10 @@ App::App(int argc, char **argv) :
{
m_self = this;
Cpu::init();
m_options = Options::parse(argc, argv);
Console::init(m_options->colors(), m_options->background());
Cpu::init();
m_network = new Network(m_options);

View file

@ -136,7 +136,7 @@ void Network::onLoginSuccess(Client *client)
return;
}
LOG_NOTICE("use pool: \"%s:%d\"", client->host(), client->port());
LOG_INFO(m_options->colors() ? "\x1B[01;37muse pool: \x1B[01;36m%s:%d" : "use pool: %s:%d", client->host(), client->port());
m_pool = id;
if (m_pool == 1 && m_pools.size() > 2) { // try disconnect from backup pool
@ -163,11 +163,11 @@ void Network::addPool(const Url *url)
void Network::setJob(Client *client, const Job &job)
{
if (m_options->colors()) {
LOG_INFO("\x1B[01;35mnew job\x1B[0m from \"%s:%d\", diff: %d", client->host(), client->port(), job.diff());
LOG_INFO("\x1B[01;35mnew job\x1B[0m from \x1B[01;37m%s:%d\x1B[0m diff: \x1B[01;37m%d", client->host(), client->port(), job.diff());
}
else {
LOG_INFO("new job from \"%s:%d\", diff: %d", client->host(), client->port(), job.diff());
LOG_INFO("new job from %s:%d diff: %d", client->host(), client->port(), job.diff());
}
Workers::setJob(job);

View file

@ -152,7 +152,7 @@ void Hashrate::print()
char num3[8];
char num4[8];
LOG_INFO(Options::i()->colors() ? "\x1B[01;37mspeed\x1B[0m 2.5s/60s/15m \x1B[01;36m%s \x1B[22;36m%s %s \x1B[01;36mH/s\x1B[0m highest: \x1B[01;36m%s H/s" : "speed 2.5s/60s/15m %s %s %s H/s highest: %s H/s",
LOG_INFO(Options::i()->colors() ? "\x1B[01;37mspeed\x1B[0m 2.5s/60s/15m \x1B[01;36m%s \x1B[22;36m%s %s \x1B[01;36mH/s\x1B[0m max: \x1B[01;36m%s H/s" : "speed 2.5s/60s/15m %s %s %s H/s highest: %s H/s",
format(calc(2500), num1, sizeof(num1)),
format(calc(60000), num2, sizeof(num2)),
format(calc(900000), num3, sizeof(num3)),