diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-21 12:54:55 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-21 12:54:55 +0000 |
commit | cc4f2f1cfb30e3995edf3c1174bd06b4bc0a9bf1 (patch) | |
tree | edf151a855ea4bcc55cad64a959b430e243deffa /src/api_server.rs | |
parent | 53cf4d1baaa994544c02ec12f4bea28598720aa8 (diff) | |
download | garage-cc4f2f1cfb30e3995edf3c1174bd06b4bc0a9bf1.tar.gz garage-cc4f2f1cfb30e3995edf3c1174bd06b4bc0a9bf1.zip |
Pretty logging
Diffstat (limited to 'src/api_server.rs')
-rw-r--r-- | src/api_server.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api_server.rs b/src/api_server.rs index fbff7b2f..6487d5fe 100644 --- a/src/api_server.rs +++ b/src/api_server.rs @@ -42,7 +42,7 @@ pub async fn run_api_server( let server = Server::bind(&addr).serve(service); let graceful = server.with_graceful_shutdown(shutdown_signal); - println!("API server listening on http://{}", addr); + info!("API server listening on http://{}", addr); graceful.await?; Ok(()) @@ -69,7 +69,7 @@ async fn handler_inner( req: Request<Body>, addr: SocketAddr, ) -> Result<Response<BodyType>, Error> { - eprintln!("{} {} {}", addr, req.method(), req.uri()); + info!("{} {} {}", addr, req.method(), req.uri()); let bucket = req .headers() @@ -231,7 +231,7 @@ impl BodyChunker { while !self.read_all && self.buf.len() < self.block_size { if let Some(block) = self.body.next().await { let bytes = block?; - eprintln!("Body next: {} bytes", bytes.len()); + trace!("Body next: {} bytes", bytes.len()); self.buf.extend(&bytes[..]); } else { self.read_all = true; |