// A middleware which logs an http request.
A middleware which logs an http request.
A middleware which logs an http request .
async fn logger(req: Request) -> Result<Request> {
    log::info!(
        "{} {} {}",
        req.remote_addr(),
        req.method(),
        req.uri().path()
    );
    Ok(req)
}
async fn logger ( req : Request ) -> Result < Request > { log :: info ! ( " " req remote_addr ( ) req method ( ) req uri ( ) path ( ) ) ; Ok ( req ) }
A middleware which logs an http request.
A middleware which logs an http request .
req
Request