Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question. How to warp::log only some routes? #1019

Open
incker opened this issue Jan 20, 2023 · 0 comments
Open

Question. How to warp::log only some routes? #1019

incker opened this issue Jan 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@incker
Copy link

incker commented Jan 20, 2023

I have found a pretty usefull thing like

use warp::Filter;

// If using something like `pretty_env_logger`,
// view logs by setting `RUST_LOG=example::api`.
let log = warp::log("example::api");
let route = warp::any()
.map(warp::reply)
.with(log);

But looks like it logs just everything...

even if I add .with(log) to one route it logging every route ((

So question how can I log some routes or exclude some routes?
forward thank you...

@incker incker added the bug Something isn't working label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant