Skip to content

Commit

Permalink
server: adjust noisy access logs (#51)
Browse files Browse the repository at this point in the history
* server: adjust noisy access logs

* Simplify PR 51

---------

Co-authored-by: Ash Manning <ash@layertwolabs.com>
  • Loading branch information
torkelrogstad and Ash-L2L authored Oct 18, 2024
1 parent e3f92b6 commit f64727c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros"] }
tokio-stream = "0.1.15"
tonic = "0.12.3"
tonic-reflection = "0.12.3"
tower = "0.5.1"
tower-http = { version = "0.6.1", features = ["trace"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
zeromq = "0.4.0"
tower = "0.5.1"
tower-http = { version = "0.6.1", features = ["trace"] }

[dependencies.bip300301]
git = "https://github.com/Ash-L2L/bip300301.git"
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ async fn run_server(

tracing::info!("Listening for gRPC on {addr} with reflection");

// Adds rather verbose access logging.
// TODO: adjust if it becomes too much.
let tracer = ServiceBuilder::new()
.layer(
TraceLayer::new_for_grpc()
.on_request(())
.on_eos(())
.on_response(DefaultOnResponse::new().level(tracing::Level::INFO))
.on_failure(DefaultOnFailure::new().level(tracing::Level::ERROR)),
)
Expand Down

0 comments on commit f64727c

Please sign in to comment.