fix: bumped audit log level higher
this is to avoid having to display everything else that's on info level, as i'd like to keep what's on info on info.
This commit is contained in:
parent
755be599ee
commit
2ed9faad98
3 changed files with 11 additions and 11 deletions
|
@ -113,7 +113,7 @@ pub async fn change_settings(
|
|||
|
||||
user::update_info(&mut *db, &user.id, new_username, new_email).await?;
|
||||
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] changed username/email (from {})",
|
||||
client_ip,
|
||||
user.id.to_string(),
|
||||
|
@ -189,7 +189,7 @@ pub async fn change_password(
|
|||
let new_password_hash = task::spawn_blocking(move || pw::hash(&new_password)).await??;
|
||||
user::update_password(&mut *db, &user.id, &new_password_hash).await?;
|
||||
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] changed password",
|
||||
client_ip,
|
||||
user.id.to_string()
|
||||
|
@ -215,7 +215,7 @@ pub async fn export_data(
|
|||
let tags = doll::list(&mut *db, &user.id).await?;
|
||||
let reserved_tags = doll::list_archived(&mut *db, &user.id).await?;
|
||||
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] exported data",
|
||||
client_ip,
|
||||
user.id.to_string()
|
||||
|
@ -262,7 +262,7 @@ pub async fn confirm_delete(
|
|||
doll::delete(&mut trx, id).await?;
|
||||
trx.commit().await?;
|
||||
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] deleted tag {:0>6}",
|
||||
client_ip,
|
||||
user.id.to_string(),
|
||||
|
@ -290,7 +290,7 @@ pub async fn confirm_terminate_account(
|
|||
session::logout(cookies);
|
||||
trx.commit().await?;
|
||||
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] deleted account",
|
||||
client_ip,
|
||||
user.id.to_string()
|
||||
|
|
|
@ -67,7 +67,7 @@ pub async fn handle_login(
|
|||
|
||||
let miss = (|username: String| {
|
||||
move || {
|
||||
info!("[audit|{}] login failure ({})", client_ip, username);
|
||||
warn!("[audit|{}] login failure ({})", client_ip, username);
|
||||
PageResponse::Page(Template::render(
|
||||
"account/login",
|
||||
context! {failure: true, meta},
|
||||
|
@ -75,7 +75,7 @@ pub async fn handle_login(
|
|||
}
|
||||
})(String::from(values.username));
|
||||
|
||||
info!("[audit|{}] login attempt ({})", client_ip, &values.username);
|
||||
warn!("[audit|{}] login attempt ({})", client_ip, &values.username);
|
||||
|
||||
let user_in_db = user::get(db, &values.username).await?;
|
||||
let user = match user_in_db {
|
||||
|
@ -89,7 +89,7 @@ pub async fn handle_login(
|
|||
|
||||
if right_password && user.enabled {
|
||||
session::login(cookies, &user.id);
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] login successful ({})",
|
||||
client_ip,
|
||||
user.id.to_string(),
|
||||
|
@ -193,7 +193,7 @@ pub async fn handle_register(
|
|||
)
|
||||
.await?;
|
||||
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] account creation",
|
||||
client_ip,
|
||||
&account_id.to_string()
|
||||
|
|
|
@ -236,7 +236,7 @@ pub async fn handle_register(
|
|||
.await;
|
||||
|
||||
if creation_status.is_err() {
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] failed to register tag {}",
|
||||
client_ip,
|
||||
user.id.to_string(),
|
||||
|
@ -245,7 +245,7 @@ pub async fn handle_register(
|
|||
}
|
||||
creation_status?;
|
||||
|
||||
info!(
|
||||
warn!(
|
||||
"[audit|{}] [{}] registered tag {}",
|
||||
client_ip,
|
||||
user.id.to_string(),
|
||||
|
|
Loading…
Add table
Reference in a new issue