From cc33bec7309a6071e3b89ea8d61907db294c2cc9 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Wed, 22 Jan 2020 23:48:46 +0100 Subject: [PATCH] Add debug log for missing config We currently log whenever we fall back to the default config because of an error in the config itself. We also log when the config was successfully loaded and where it was loaded from. The only scenario where no config related message is logged is when there is no configuration file present. Logging this case should make it easier to debug issues like #3240, without requiring any knowledge from maintainers about this edgecase. --- alacritty/src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/alacritty/src/main.rs b/alacritty/src/main.rs index 64e0b9c..db08245 100644 --- a/alacritty/src/main.rs +++ b/alacritty/src/main.rs @@ -128,9 +128,11 @@ fn main() { /// config change monitor, and runs the main display loop. fn run(window_event_loop: GlutinEventLoop, config: Config) -> Result<(), Box> { info!("Welcome to Alacritty"); - if let Some(config_path) = &config.config_path { - info!("Configuration loaded from \"{}\"", config_path.display()); - }; + + match &config.config_path { + Some(config_path) => info!("Configuration loaded from \"{}\"", config_path.display()), + None => info!("No configuration file found"), + } // Set environment variables tty::setup_env(&config);