handlers::event: improve tracing
This commit is contained in:
parent
9d0c022c68
commit
af9938a3c6
9 changed files with 34 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
use crate::api::REQWEST_CLIENT;
|
||||
|
||||
use eyre::{eyre, Result};
|
||||
use log::trace;
|
||||
use once_cell::sync::Lazy;
|
||||
use regex::Regex;
|
||||
use reqwest::StatusCode;
|
||||
|
@ -8,6 +9,8 @@ use reqwest::StatusCode;
|
|||
static REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"https://mclo\.gs/(\w+)").unwrap());
|
||||
|
||||
pub async fn find(content: &str) -> Result<Option<String>> {
|
||||
trace!("Checking if {content} is an mclo.gs paste");
|
||||
|
||||
let Some(captures) = REGEX.captures(content) else {
|
||||
return Ok(None);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue