forked from kemitix/git-next
feat(server): log error when fails to load config
This commit is contained in:
parent
dc4110596f
commit
ef75ecda08
1 changed files with 9 additions and 2 deletions
|
@ -2,7 +2,7 @@ mod config;
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use tracing::info;
|
use tracing::{error, info};
|
||||||
|
|
||||||
use crate::filesystem::FileSystem;
|
use crate::filesystem::FileSystem;
|
||||||
|
|
||||||
|
@ -30,7 +30,14 @@ pub fn start(fs: FileSystem) {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
info!("Starting Server...");
|
info!("Starting Server...");
|
||||||
let _config = config::Config::load(&fs);
|
let config = match config::Config::load(&fs) {
|
||||||
|
Ok(config) => config,
|
||||||
|
Err(err) => {
|
||||||
|
error!("Failed to load config file. Error: {}", err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
info!("Config loaded");
|
||||||
// todo!()
|
// todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue