diff --git a/src/main.rs b/src/main.rs index a37ff75..f4dd0a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -54,6 +54,14 @@ enum JobContent { Text(TextContent), } +impl JobContent { + fn kind(&self) -> &'static str { + match self { + JobContent::Text(_) => "text", + } + } +} + #[derive(Deserialize, Serialize, Debug)] #[serde(rename_all = "camelCase")] struct TextContent { @@ -190,6 +198,11 @@ async fn run_stream( fn handle_jobs(mut printer: Printer, mut task_rx: TaskRx) -> Result<()> { while let Some(task) = task_rx.blocking_recv() { + tracing::info!( + id = task.identifier, + kind = task.job.content.kind(), + "handling job" + ); match task.job.content { JobContent::Text(c) if !c.text.is_empty() => { printer