From 2de9c744d7e0dec80b38f7c72a3e18b280b006d2 Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 13 Dec 2025 14:54:02 -0800 Subject: [PATCH] tweak --- src/lib.rs | 10 ---------- src/main.rs | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 159334a..998a620 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,6 @@ use sqlx::{ }; use tokio::task::{JoinHandle, JoinSet}; use tokio_util::{bytes::Buf, sync::CancellationToken}; -use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; use unicode_segmentation::UnicodeSegmentation; pub mod server; @@ -50,14 +49,6 @@ struct ZulipMessage<'s> { impl BlogdorTheAggregator { pub async fn new() -> Self { - tracing_subscriber::registry() - .with( - tracing_subscriber::EnvFilter::try_from_default_env() - .unwrap_or_else(|_| "blogdor=debug,axum=debug".into()), - ) - .with(tracing_subscriber::fmt::layer()) - .init(); - let db = get_db_pool().await; let client = reqwest::Client::new(); // TODO: retries? let cancel = CancellationToken::new(); @@ -152,7 +143,6 @@ async fn check_feeds(db: &SqlitePool, client: &reqwest::Client) { topic: Some(&post.title), }; let msg = serde_urlencoded::to_string(msg).expect("serialize msg"); - dbg!(&msg); match client .post(&endpoint) diff --git a/src/main.rs b/src/main.rs index deb61a2..4d7dd52 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,16 @@ use blogdor::BlogdorTheAggregator; +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; #[tokio::main(flavor = "multi_thread")] async fn main() { + tracing_subscriber::registry() + .with( + tracing_subscriber::EnvFilter::try_from_default_env() + .unwrap_or_else(|_| "blogdor=debug,axum=debug".into()), + ) + .with(tracing_subscriber::fmt::layer()) + .init(); + let bta = BlogdorTheAggregator::new().await; let aggregator_handle = bta.aggregate().await; let server_handle = bta.listen_http().await;