Skip to content

Commit

Permalink
Add requests logging to warp
Browse files Browse the repository at this point in the history
  • Loading branch information
imclint21 committed Nov 28, 2019
1 parent b1e9526 commit f3bf3cd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ impl Server {
.and(path::end())
.and(warp::get2().map(|| "User-agent: *\nDisallow: /"));

let routes = api_kv_key.or(webui).or(robots).recover(process_error);
let log = warp::log("lucid::Server");

let routes = api_kv_key
.or(webui)
.or(robots)
.recover(process_error)
.with(log);

warp::serve(routes).run((
configuration.default.bind_address,
configuration.default.port,
Expand Down

0 comments on commit f3bf3cd

Please sign in to comment.