Skip to content

Commit

Permalink
chore: update logging to only show ? when a query exists
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonVirgo committed Aug 4, 2024
1 parent 8c3a42f commit 08911e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ where
let method = req.method().clone();
let path = req.path().to_string();
let query = req.query_string().to_string();
println!("{} {}?{}", method, path, query);

if query == "" {
println!("{} {}", method, path);
} else {
println!("{} {}?{}", method, path, query);
}

let fut = self.service.call(req);
async move {
Expand Down

0 comments on commit 08911e2

Please sign in to comment.