From 1de2bd2ecb0806a28dfebb566388605d97409c18 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 7 Apr 2024 19:08:23 +0100 Subject: [PATCH] feat(server): log parsed config --- src/server/mod.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/server/mod.rs b/src/server/mod.rs index 9639ce5..9e1a0ff 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -38,7 +38,20 @@ pub fn start(fs: FileSystem) { } }; info!("Config loaded"); - // todo!() + info!("Loaded config"); + config.forges().for_each(|(name, forge)| { + let span = tracing::info_span!("Forge", name); + let _guard = span.enter(); + info!("Forge: {}", name); + info!("Forge Type: {}", forge.forge_type()); + info!("Hostname: {}", forge.hostname()); + info!("User: {}", forge.user()); + forge.repos().for_each(|(name, path)| { + let span = tracing::info_span!("Repo", name); + let _guard = span.enter(); + info!("Repo: {} - {}", name, path); + }); + }); } pub fn init_logging() -> Result<(), tracing::subscriber::SetGlobalDefaultError> {