add debug for client config
This commit is contained in:
parent
5300afa205
commit
3a855a7e4a
2 changed files with 11 additions and 2 deletions
|
@ -72,6 +72,7 @@ pub fn load_config() -> Result<Config, ConfigError> {
|
|||
Ok(config)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
/// Represents a fully parsed config, from a variety of sources.
|
||||
pub struct Config {
|
||||
pub cache_type: CacheType,
|
||||
|
@ -199,10 +200,16 @@ struct YamlServerSettings {
|
|||
external_ip: Option<IpAddr>,
|
||||
}
|
||||
|
||||
// this intentionally does not implement display or debug
|
||||
// this intentionally does not implement display
|
||||
#[derive(Deserialize, Serialize, Clone)]
|
||||
pub struct ClientSecret(String);
|
||||
|
||||
impl std::fmt::Debug for ClientSecret {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "[client secret]")
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Default)]
|
||||
struct YamlExtendedOptions {
|
||||
memory_quota: Option<Mebibytes>,
|
||||
|
@ -213,7 +220,7 @@ struct YamlExtendedOptions {
|
|||
cache_path: Option<PathBuf>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Copy, Clone)]
|
||||
#[derive(Deserialize, Copy, Clone, Debug)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum CacheType {
|
||||
OnDisk,
|
||||
|
|
|
@ -86,6 +86,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
|||
return Err(e);
|
||||
}
|
||||
|
||||
debug!("{:?}", &config);
|
||||
|
||||
let client_secret = config.client_secret.clone();
|
||||
let client_secret_1 = config.client_secret.clone();
|
||||
|
||||
|
|
Loading…
Reference in a new issue