I am trying to log request / response bodies in warp.
When using warp::log::custom
, the Info
struct doesn't contain any info about it.
When trying to implement my own log wrapper, based on the implementation of warp::log
, the Route
struct is private (among others).
I can log bodies after they are deserialized using
warp::body::json().map(|it| {
println!("Hello : {:?}", it);
it
})
But if the user doesn't send a correct body, it wont work. Moreover, I am looking for a simple way to log all requests bodies.