From b95f52637cf1980a474a197447f96325a70690df Mon Sep 17 00:00:00 2001 From: xairaven Date: Sun, 14 Jul 2024 20:41:30 +0300 Subject: [PATCH] (Style) Slightly changed log format --- media_fetch_bot/src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/media_fetch_bot/src/main.rs b/media_fetch_bot/src/main.rs index c413a46..5aeb271 100644 --- a/media_fetch_bot/src/main.rs +++ b/media_fetch_bot/src/main.rs @@ -85,7 +85,7 @@ async fn handle_message(bot: Bot, msg: Message, bot.send_message(msg.chat.id, title).await?; } - log::info!("{}", format!("Tiktok link: {}\nChat ID: {}", text, msg.chat.id)); + log::info!("{}", format!("ChatID: {} -> Tiktok: {}", msg.chat.id, text)); } Err(err) => { let error_text = format!("{}\n\n{}", @@ -95,8 +95,8 @@ async fn handle_message(bot: Bot, msg: Message, .parse_mode(ParseMode::Html) .await?; - log::warn!("{}", format!("Query: {}\nChat ID: {}\nError: {}", - text, msg.chat.id, err.to_string())); + log::warn!("{}", format!("ChatID: {} -> ErrQuery: {}", + msg.chat.id, text)); return Ok(()); } @@ -105,8 +105,7 @@ async fn handle_message(bot: Bot, msg: Message, _ => { bot.send_message(msg.chat.id, t!(LocalizationCommand::LinkTypeUndefined.into())).await?; - - log::info!("{}", format!("Undefined link: {}\nChat ID: {}", text, msg.chat.id)); + log::info!("{}", format!("ChatID: {} -> Undefined: {}", msg.chat.id, text)); } }