1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

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.
This commit is contained in:
Christian Duerr 2020-01-22 23:48:46 +01:00 committed by GitHub
parent e61c28e451
commit cc33bec730
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,9 +128,11 @@ fn main() {
/// config change monitor, and runs the main display loop.
fn run(window_event_loop: GlutinEventLoop<Event>, config: Config) -> Result<(), Box<dyn Error>> {
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);