diff --git a/examples/main.rs b/examples/main.rs index c3c8b70..8312310 100644 --- a/examples/main.rs +++ b/examples/main.rs @@ -24,6 +24,16 @@ async fn main() -> anyhow::Result<()> { let mut manager = Opentelemetry::new(); manager.init_log("example", &args.level, &url)?; + match args.level.as_str() { + "info" => log::info!("{}", args.message), + "debug" => log::debug!("{}", args.message), + _ => anyhow::bail!("level `{}` not found", args.level), + } + drop(manager); + + let mut manager = Opentelemetry::new(); + manager.init_log("foo", &args.level, &url)?; + match args.level.as_str() { "info" => log::info!("{}", args.message), "debug" => log::debug!("{}", args.message),