Skip to content

Commit

Permalink
config: log config file re-reads
Browse files Browse the repository at this point in the history
Being certain that the config file was actually re-read is invaluable
when debugging issues with e.g. new machines.
  • Loading branch information
hnez committed Aug 21, 2024
1 parent 8ffdab3 commit caaa125
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::time::SystemTime;

use log::error;
use log::{error, info};
use serde::Deserialize;

mod duration_human;
Expand Down Expand Up @@ -100,6 +100,7 @@ impl Inner {
Ok(cf) => {
self.config_file = cf;
self.last_modified = last_modified;
info!("Re-read config file {}", self.path.display());
}
Err(e) => {
error!("Failed to re-read config: {e}. Re-using previous version.");
Expand Down

0 comments on commit caaa125

Please sign in to comment.