There is a comment in the code
impl Config {
pub fn new() -> anyhow::Result<Config> {
let mut config = config::Config::default();
if std::path::Path::new("config.toml").exists() {
config.merge(config::File::with_name("config")).unwrap();
}
update_from_env(&mut config);
if config.get::<u16>("port").is_err() {
config.set("port", 4347).unwrap();
}
// TODO: print resulted config (perfectly, it needs adding `derive(Debug)` in `subbeat`'s `DatasourceConfig`)
Ok(Config {
port: config.get::<u16>("port").unwrap(),
datasource_config: resolve_datasource(&config)?,
alerting: resolve_alerting(&config)?,
})
}
}
so this issue is about printing to log (console) variables values
good first issue