mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
core: battery limit management
This commit is contained in:
parent
78490f7c08
commit
09a38dd136
8 changed files with 276 additions and 18 deletions
|
@ -202,16 +202,6 @@ pub fn run_daemon(mut config: AppConfig, verbose: bool) -> Result<(), Box<dyn st
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Initialize the logger with the appropriate level
|
||||
const fn get_log_level_filter(log_level: LogLevel) -> LevelFilter {
|
||||
match log_level {
|
||||
LogLevel::Error => LevelFilter::Error,
|
||||
LogLevel::Warning => LevelFilter::Warn,
|
||||
LogLevel::Info => LevelFilter::Info,
|
||||
LogLevel::Debug => LevelFilter::Debug,
|
||||
}
|
||||
}
|
||||
|
||||
/// Write current system stats to a file for --stats to read
|
||||
fn write_stats_file(path: &str, report: &SystemReport) -> Result<(), std::io::Error> {
|
||||
let mut file = File::create(path)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue