Skip to content

Commit

Permalink
Adjust logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mikroskeem committed Dec 2, 2024
1 parent 868f06b commit d4f7200
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ async fn main() -> anyhow::Result<()> {
)?);

let serve_future = make_service_fn(move |socket: &AddrStream| {
log::info!("listening on http://{}", addr);
let rpc = rpc.clone();
let addr = socket.remote_addr();
async move {
Expand All @@ -48,6 +47,7 @@ async fn main() -> anyhow::Result<()> {
});

// launch server
log::info!("listening on http://{}", addr);
let server = Server::bind(addr).serve(serve_future);
if let Err(err) = server.await {
log::error!("server error: {}", err);
Expand Down
2 changes: 1 addition & 1 deletion src/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub(crate) async fn serve_req(
rpc: Arc<Client>,
) -> ClientResult<Response<Body>> {
if req.method() != Method::GET || req.uri().path() != "/metrics" {
log::warn!(" [{}] {} {}", addr, req.method(), req.uri().path());
log::debug!(" [{}] {} {}", addr, req.method(), req.uri().path());
return Ok(Response::builder()
.status(404)
.body(Body::default())
Expand Down

0 comments on commit d4f7200

Please sign in to comment.