From 57a86b2fe63fc91302265b580b694ab076a52a97 Mon Sep 17 00:00:00 2001 From: containerscrew Date: Fri, 11 Oct 2024 17:23:03 +0200 Subject: [PATCH] Change logging --- local.config.toml | 2 +- src/handlers.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/local.config.toml b/local.config.toml index 7b7f83b..2eec07b 100644 --- a/local.config.toml +++ b/local.config.toml @@ -4,7 +4,7 @@ port = 8000 use_proxy = false [logging] -log_level = "info" +log_level = " info" [database] # If you are running iproxy in localhost, change the address from mongodb:27017 to localhost:27017 diff --git a/src/handlers.rs b/src/handlers.rs index 05c8c17..6d5f7e0 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -63,9 +63,9 @@ pub async fn get_ip( } Err(e) => { warn!( - "Error serializing geolocation data: {}. External api response {}", - e, - ip_geolocation.to_string() + erro = %e, + external_api_error = %ip_geolocation.0, + "error serializing geolocation data" ); // Return the original JSON from the external API if serialization fails Ok((StatusCode::NOT_FOUND, ip_geolocation))