feat(lib): switch from log to tracing (#475)

This commit is contained in:
David Barsky
2020-07-07 18:55:24 -04:00
committed by GitHub
parent d6fa8386c4
commit d3b9f1e36a
29 changed files with 179 additions and 176 deletions

View File

@@ -9,6 +9,6 @@ edition = "2018"
[dev-dependencies]
h2-support = { path = "../h2-support" }
log = "0.4.1"
tracing = "0.1.13"
futures = { version = "0.3", default-features = false, features = ["alloc"] }
tokio = { version = "0.2", features = ["macros", "tcp"] }

View File

@@ -16,7 +16,7 @@ async fn handshake() {
let (_client, h2) = client::handshake(mock).await.unwrap();
log::trace!("hands have been shook");
tracing::trace!("hands have been shook");
// At this point, the connection should be closed
h2.await.unwrap();
@@ -84,7 +84,7 @@ async fn recv_invalid_server_stream_id() {
.body(())
.unwrap();
log::info!("sending request");
tracing::info!("sending request");
let (response, _) = client.send_request(request, true).unwrap();
// The connection errors

View File

@@ -31,7 +31,7 @@ async fn send_recv_headers_only() {
.body(())
.unwrap();
log::info!("sending request");
tracing::info!("sending request");
let (response, _) = client.send_request(request, true).unwrap();
let resp = h2.run(response).await.unwrap();
@@ -72,7 +72,7 @@ async fn send_recv_data() {
.body(())
.unwrap();
log::info!("sending request");
tracing::info!("sending request");
let (response, mut stream) = client.send_request(request, false).unwrap();
// Reserve send capacity
@@ -129,7 +129,7 @@ async fn send_headers_recv_data_single_frame() {
.body(())
.unwrap();
log::info!("sending request");
tracing::info!("sending request");
let (response, _) = client.send_request(request, true).unwrap();
let resp = h2.run(response).await.unwrap();

View File

@@ -28,7 +28,7 @@ async fn recv_trailers_only() {
.body(())
.unwrap();
log::info!("sending request");
tracing::info!("sending request");
let (response, _) = client.send_request(request, true).unwrap();
let response = h2.run(response).await.unwrap();
@@ -79,7 +79,7 @@ async fn send_trailers_immediately() {
.body(())
.unwrap();
log::info!("sending request");
tracing::info!("sending request");
let (response, mut stream) = client.send_request(request, false).unwrap();
let mut trailers = HeaderMap::new();