Skip to content

Commit d2c25f4

Browse files
authored
Merge pull request #635 from async-rs/revert-629-update-log
Revert "upgrade log, remove kv-log-macro"
2 parents c7cf193 + d8befe2 commit d2c25f4

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Diff for: Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ default = [
2727
"crossbeam-channel",
2828
"crossbeam-deque",
2929
"futures-timer",
30+
"kv-log-macro",
3031
"log",
3132
"mio",
3233
"mio-uds",
@@ -57,7 +58,8 @@ crossbeam-utils = { version = "0.7.0", optional = true }
5758
futures-core = { version = "0.3.1", optional = true }
5859
futures-io = { version = "0.3.1", optional = true }
5960
futures-timer = { version = "2.0.2", optional = true }
60-
log = { version = "0.4.10", features = ["kv_unstable"], optional = true }
61+
kv-log-macro = { version = "1.0.4", optional = true }
62+
log = { version = "0.4.8", features = ["kv_unstable"], optional = true }
6163
memchr = { version = "2.2.1", optional = true }
6264
mio = { version = "0.6.19", optional = true }
6365
mio-uds = { version = "0.6.7", optional = true }

Diff for: src/task/block_on.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::task::{RawWaker, RawWakerVTable};
66
use std::thread;
77

88
use crossbeam_utils::sync::Parker;
9+
use kv_log_macro::trace;
910
use log::log_enabled;
1011

1112
use crate::task::{Context, Poll, Task, Waker};
@@ -42,7 +43,7 @@ where
4243

4344
// Log this `block_on` operation.
4445
if log_enabled!(log::Level::Trace) {
45-
log::trace!("block_on", {
46+
trace!("block_on", {
4647
task_id: task.id().0,
4748
parent_task_id: Task::get_current(|t| t.id().0).unwrap_or(0),
4849
});
@@ -58,7 +59,7 @@ where
5859
defer! {
5960
if log_enabled!(log::Level::Trace) {
6061
Task::get_current(|t| {
61-
log::trace!("completed", {
62+
trace!("completed", {
6263
task_id: t.id().0,
6364
});
6465
});

Diff for: src/task/builder.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use kv_log_macro::trace;
12
use log::log_enabled;
23
use std::future::Future;
34

@@ -37,7 +38,7 @@ impl Builder {
3738

3839
// Log this `spawn` operation.
3940
if log_enabled!(log::Level::Trace) {
40-
log::trace!("spawn", {
41+
trace!("spawn", {
4142
task_id: task.id().0,
4243
parent_task_id: Task::get_current(|t| t.id().0).unwrap_or(0),
4344
});
@@ -53,7 +54,7 @@ impl Builder {
5354
defer! {
5455
if log_enabled!(log::Level::Trace) {
5556
Task::get_current(|t| {
56-
log::trace!("completed", {
57+
trace!("completed", {
5758
task_id: t.id().0,
5859
});
5960
});

0 commit comments

Comments
 (0)