Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c7cf193

Browse files
authored
Merge pull request #629 from async-rs/update-log
upgrade log, remove kv-log-macro
2 parents 37d8a01 + b7e5576 commit c7cf193

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

‎Cargo.toml‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ default = [
2727
"crossbeam-channel",
2828
"crossbeam-deque",
2929
"futures-timer",
30-
"kv-log-macro",
3130
"log",
3231
"mio",
3332
"mio-uds",
@@ -58,8 +57,7 @@ crossbeam-utils = { version = "0.7.0", optional = true }
5857
futures-core = { version = "0.3.1", optional = true }
5958
futures-io = { version = "0.3.1", optional = true }
6059
futures-timer = { version = "2.0.2", optional = true }
61-
kv-log-macro = { version = "1.0.4", optional = true }
62-
log = { version = "0.4.8", features = ["kv_unstable"], optional = true }
60+
log = { version = "0.4.10", features = ["kv_unstable"], optional = true }
6361
memchr = { version = "2.2.1", optional = true }
6462
mio = { version = "0.6.19", optional = true }
6563
mio-uds = { version = "0.6.7", optional = true }

‎src/task/block_on.rs‎

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

88
use crossbeam_utils::sync::Parker;
9-
use kv_log_macro::trace;
109
use log::log_enabled;
1110

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

4443
// Log this `block_on` operation.
4544
if log_enabled!(log::Level::Trace) {
46-
trace!("block_on", {
45+
log::trace!("block_on", {
4746
task_id: task.id().0,
4847
parent_task_id: Task::get_current(|t| t.id().0).unwrap_or(0),
4948
});
@@ -59,7 +58,7 @@ where
5958
defer! {
6059
if log_enabled!(log::Level::Trace) {
6160
Task::get_current(|t| {
62-
trace!("completed", {
61+
log::trace!("completed", {
6362
task_id: t.id().0,
6463
});
6564
});

‎src/task/builder.rs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use kv_log_macro::trace;
21
use log::log_enabled;
32
use std::future::Future;
43

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

3938
// Log this `spawn` operation.
4039
if log_enabled!(log::Level::Trace) {
41-
trace!("spawn", {
40+
log::trace!("spawn", {
4241
task_id: task.id().0,
4342
parent_task_id: Task::get_current(|t| t.id().0).unwrap_or(0),
4443
});
@@ -54,7 +53,7 @@ impl Builder {
5453
defer! {
5554
if log_enabled!(log::Level::Trace) {
5655
Task::get_current(|t| {
57-
trace!("completed", {
56+
log::trace!("completed", {
5857
task_id: t.id().0,
5958
});
6059
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /