Skip to content

Commit

Permalink
change color for monitoring output
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausT committed Jun 17, 2018
1 parent 01eb019 commit b30a2c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ enum
LOG_DEBUG,
/* custom notices */
LOG_BLUE = 0x10,
LOG_HW = 0x20,
LOG_RAW = 0x99
};
#endif
Expand Down
2 changes: 1 addition & 1 deletion nvml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2286,7 +2286,7 @@ void *monitor_thread(void *userdata)

if(opt_hwmonitor && (time(NULL) - cgpu->monitor.tm_displayed) > 60)
{
applog(LOG_NOTICE, "GPU #%d: %u MHz core, %u MHz mem, %s, %uC, FAN %u%%", device_map[thr_id],
applog(LOG_HW, "GPU #%d: %u MHz core, %u MHz mem, %s, %uC, FAN %u%%", device_map[thr_id],
cgpu->monitor.gpu_clock, cgpu->monitor.gpu_memclock,
khw, cgpu->monitor.gpu_temp, cgpu->monitor.gpu_fan
);
Expand Down
6 changes: 6 additions & 0 deletions util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ void applog(int prio, const char *fmt, ...)
switch(prio)
{
case LOG_BLUE: prio = LOG_NOTICE; break;
case LOG_HW: prio = LOG_INFO; break;
}
}

Expand Down Expand Up @@ -150,6 +151,11 @@ void applog(int prio, const char *fmt, ...)
case LOG_INFO: color = ""; break;
case LOG_DEBUG: color = CL_GRY; break;

case LOG_HW:
color = CL_MAG;
prio = LOG_INFO;
break;

case LOG_BLUE:
prio = LOG_NOTICE;
color = CL_CYN;
Expand Down

0 comments on commit b30a2c8

Please sign in to comment.