From b4452fff379ce258a1b207252a10e4ffe478f2c4 Mon Sep 17 00:00:00 2001 From: neri Date: Fri, 26 Jan 2024 14:18:27 +0100 Subject: [PATCH] feat: disable request logging, don't log ip --- src/main.rs | 1 - src/upload.rs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index a01f416..bc93978 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,7 +81,6 @@ async fn main() -> std::io::Result<()> { let http_server = HttpServer::new({ move || { App::new() - .wrap(Logger::new(r#"%{r}a "%r" =%s %bbytes %Tsec"#)) .wrap( DefaultHeaders::new() .add(DEFAULT_CONTENT_SECURITY_POLICY) diff --git a/src/upload.rs b/src/upload.rs index 704aa3f..1551791 100644 --- a/src/upload.rs +++ b/src/upload.rs @@ -49,8 +49,7 @@ pub async fn upload( insert_file_metadata(&file_id, file_name, &file_path, &upload_config, db).await?; log::info!( - "{} create new file {} (valid_till: {}, content_type: {}, delete_on_download: {})", - req.connection_info().realip_remote_addr().unwrap_or("-"), + "create new file {} (valid_till: {}, content_type: {}, delete_on_download: {})", file_id, upload_config.valid_till, upload_config.content_type,