Skip to content

Commit

Permalink
(Style) Slightly changed log format
Browse files Browse the repository at this point in the history
  • Loading branch information
xairaven committed Jul 14, 2024
1 parent e8efb4d commit b95f526
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions media_fetch_bot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<i>{}</i>",
Expand All @@ -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(());
}
Expand All @@ -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));
}
}

Expand Down

0 comments on commit b95f526

Please sign in to comment.