logging lib
This commit is contained in:
@@ -9,11 +9,11 @@ void detectHwmon(cpuSensors* target, std::string pci) {
|
||||
for (const auto& entry : std::filesystem::directory_iterator(path))
|
||||
target->hwmon = getFirstDir(path);
|
||||
} catch (...) {
|
||||
std::println("[cpu::detectHwmon] NO CPU HWMON KERNEL MODULE DETECTED");
|
||||
log(LOG::ERR, "cpu::detectHwmon", "NO CPU HWMON KERNEL MODULE DETECTED");
|
||||
return;
|
||||
}
|
||||
target->zenpower = readFile((target->hwmon + "/name"), 128) == "zenpower";
|
||||
std::println("[cpu::detectHwmon] Detected module \"{}\" in path \"{}\"", target->zenpower ? "zenpower" : "k10temp", target->hwmon);
|
||||
log(LOG::INF, "cpu::detectHwmon", "Detected module \"{}\" in path \"{}\"", target->zenpower ? "zenpower" : "k10temp", target->hwmon);
|
||||
}
|
||||
|
||||
void update(cpuSensors* c) {
|
||||
@@ -29,7 +29,7 @@ void update(cpuSensors* c) {
|
||||
c->vcore = (double)(std::stoul(readFile(c->hwmon + "/in1_input", 4)) / 1000.0);
|
||||
// cpu.vsoc = (double)(std::stoul(readFile(hw.path + "/in2_input")) / 1000.0);
|
||||
} else {
|
||||
c->tctl = std::stoi(readFile(c->hwmon+ "/temp1_input", 2));
|
||||
c->tctl = std::stoi(readFile(c->hwmon + "/temp1_input", 2));
|
||||
c->tccd1 = std::stoi(readFile(c->hwmon + "/temp3_input", 2));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user