Skip to content

Commit

Permalink
[http] route logging is now at the info level
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenmeier committed Apr 23, 2024
1 parent b128d2b commit 17d88cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions fire-http/src/fire.rs
Expand Up @@ -9,7 +9,7 @@ use std::convert::Infallible;
use std::net::SocketAddr;
use std::time::Duration;

use tracing::{debug, debug_span, error, Instrument};
use tracing::{error, info, info_span, Instrument};

use types::body::BodyHttp;
use types::header::StatusCode;
Expand Down Expand Up @@ -84,7 +84,7 @@ pub(crate) async fn route_hyper(
hyper_req: HyperRequest,
address: SocketAddr,
) -> Result<hyper::Response<BodyHttp>, Infallible> {
let span = debug_span!(
let span = info_span!(
"req",
method = ?hyper_req.method(),
uri = ?hyper_req.uri(),
Expand All @@ -93,7 +93,7 @@ pub(crate) async fn route_hyper(
let route_resp = async move {
let resp = route_hyper_req(wood, hyper_req, address).await;
let status_code = resp.header().status_code;
debug!(?status_code, "resp");
info!(?status_code, "resp");

resp
}
Expand Down
2 changes: 0 additions & 2 deletions fire-http/src/fs/static_files.rs
Expand Up @@ -230,8 +230,6 @@ impl Route for StaticFilesRoute {
// build full pathbuf
let path_buf = Path::new(&*self.path).join(path_buf);

tracing::info!("trying to serve {:?}", path_buf);

serve_file(path_buf, &req, caching)
.await
.map_err(Error::from_client_io)
Expand Down

0 comments on commit 17d88cc

Please sign in to comment.