Skip to content

Commit

Permalink
Use trace level debug inside the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jackra1n committed May 18, 2024
1 parent b4800dc commit 7811cc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fs;
use std::thread;
use std::time::{Duration, Instant};
use sysinfo::{System, Disks, RefreshKind, CpuRefreshKind, MemoryRefreshKind};
use log::{info, debug};
use log::{info, debug, trace};
use clap::Parser;
use env_logger::{Builder, Env};

Expand Down Expand Up @@ -66,8 +66,8 @@ fn main() -> Result<(), Box<dyn Error>> {
let cpu_usage = format!("{:.1}", sys.global_cpu_info().cpu_usage());
let ram_usage = format!("{:.1}", get_ram_usage(&sys));

debug!("Checking fan controller. Fan running: {}", fan_controller.is_running);
debug!("CPU Temp: {}, Temp-on: {}, Temp-off: {}", temp, fan_controller.temp_on, fan_controller.temp_off);
trace!("Checking fan controller. Fan running: {}", fan_controller.is_running);
trace!("CPU Temp: {}, Temp-on: {}, Temp-off: {}", temp, fan_controller.temp_on, fan_controller.temp_off);
if fan_controller.is_running {
if temp <= fan_controller.temp_off {
fan_controller.fan_off()?;
Expand Down

0 comments on commit 7811cc0

Please sign in to comment.