Replace all event! by a specific macro: warn!, error!, etc.

This commit is contained in:
Greg Burri 2025-04-30 01:50:50 +02:00
parent 1485110204
commit 8152d3d9b0
7 changed files with 43 additions and 82 deletions

View file

@ -21,7 +21,7 @@ use tower_http::{
services::{ServeDir, ServeFile},
trace::TraceLayer,
};
use tracing::{Level, event};
use tracing::warn;
use crate::{
config::Config,
@ -422,13 +422,13 @@ async fn get_current_user(
match connection.load_user(user_id).await {
Ok(user) => user,
Err(error) => {
event!(Level::WARN, "Error during authentication: {}", error);
warn!("Error during authentication: {}", error);
None
}
}
}
Err(error) => {
event!(Level::WARN, "Error during authentication: {}", error);
warn!("Error during authentication: {}", error);
None
}
},