prettier logger
This commit is contained in:
@@ -12,11 +12,11 @@ namespace gpu {
|
||||
/* takes pointer to a target gpu::sensors struct and updates its hwmon path and detects gpu_metrics */
|
||||
void detectHwmon(gpuSensors* target, const std::string& pci) {
|
||||
target->hwmon = getFirstDir("/sys/bus/pci/devices/" + pci + "/hwmon");
|
||||
log(LOG::INF, "gpu::detectHwmon", "Detected path \"{}\"", target->hwmon);
|
||||
log(LOG::INF, "Detected path \"{}\"", target->hwmon);
|
||||
|
||||
if (FILE* file = fopen((target->hwmon + REL_METRICS_PATH).c_str(), "r")) {
|
||||
fclose(file);
|
||||
log(LOG::INF, "gpu::detectHwmon", "found gpu_metrics");
|
||||
log(LOG::INF, "found gpu_metrics");
|
||||
target->hasGpuMetrics = true;
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ void updateFromMetrics(gpuSensors* g) {
|
||||
|
||||
/* werid hardware i probably dont like, maybe fallback to reading from fs? */
|
||||
default: {
|
||||
log(LOG::WRN, "gpu::updateFromMetrics", "Unsupported gpu_metrics_v{}_{}", header->format_revision, header->content_revision);
|
||||
log(LOG::WRN, "Unsupported gpu_metrics_v{}_{}", header->format_revision, header->content_revision);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user