From a2372f9e9a5031b2a31af3ad8fbbb8514616fcfc Mon Sep 17 00:00:00 2001 From: Marc Planard Date: Mon, 5 Jun 2023 13:12:49 +0200 Subject: [PATCH] more info --- copyme.Settings.toml | 2 +- src/main.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/copyme.Settings.toml b/copyme.Settings.toml index 262751f..d0055a3 100644 --- a/copyme.Settings.toml +++ b/copyme.Settings.toml @@ -5,7 +5,7 @@ laser_id = 0 # Activate for more debug -debug = "true" +debug = true # Redis URL as redis://IP:port/ redis_url = "redis://127.0.0.1:6379/" diff --git a/src/main.rs b/src/main.rs index 487ad7c..bba4514 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,7 @@ fn run_all() -> LJResult<()> { let config = Conf::new(&filename); init_logging(&config); let config = config?; - info!("Starting up"); + info!("*** Starting up ***"); let mut rs = RedisCtrl::new(&config.redis_url)?; @@ -88,12 +88,12 @@ fn init_logging(config: &LJResult) { builder .filter(None, LevelFilter::Info) .init(); - } else { - env_logger::init(); + info!("Debug mode enabled from configuration file"); + return; } - } else { - env_logger::init(); } + info!("Logging level inherited from env"); + env_logger::init(); } fn get_helios_device() -> LJResult {