File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ default = [
27
27
" crossbeam-channel" ,
28
28
" crossbeam-deque" ,
29
29
" futures-timer" ,
30
+ " kv-log-macro" ,
30
31
" log" ,
31
32
" mio" ,
32
33
" mio-uds" ,
@@ -57,7 +58,8 @@ crossbeam-utils = { version = "0.7.0", optional = true }
57
58
futures-core = { version = " 0.3.1" , optional = true }
58
59
futures-io = { version = " 0.3.1" , optional = true }
59
60
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 }
61
63
memchr = { version = " 2.2.1" , optional = true }
62
64
mio = { version = " 0.6.19" , optional = true }
63
65
mio-uds = { version = " 0.6.7" , optional = true }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use std::task::{RawWaker, RawWakerVTable};
6
6
use std:: thread;
7
7
8
8
use crossbeam_utils:: sync:: Parker ;
9
+ use kv_log_macro:: trace;
9
10
use log:: log_enabled;
10
11
11
12
use crate :: task:: { Context , Poll , Task , Waker } ;
42
43
43
44
// Log this `block_on` operation.
44
45
if log_enabled ! ( log:: Level :: Trace ) {
45
- log :: trace!( "block_on" , {
46
+ trace ! ( "block_on" , {
46
47
task_id: task. id( ) . 0 ,
47
48
parent_task_id: Task :: get_current( |t| t. id( ) . 0 ) . unwrap_or( 0 ) ,
48
49
} ) ;
58
59
defer ! {
59
60
if log_enabled!( log:: Level :: Trace ) {
60
61
Task :: get_current( |t| {
61
- log :: trace!( "completed" , {
62
+ trace!( "completed" , {
62
63
task_id: t. id( ) . 0 ,
63
64
} ) ;
64
65
} ) ;
Original file line number Diff line number Diff line change
1
+ use kv_log_macro:: trace;
1
2
use log:: log_enabled;
2
3
use std:: future:: Future ;
3
4
@@ -37,7 +38,7 @@ impl Builder {
37
38
38
39
// Log this `spawn` operation.
39
40
if log_enabled ! ( log:: Level :: Trace ) {
40
- log :: trace!( "spawn" , {
41
+ trace ! ( "spawn" , {
41
42
task_id: task. id( ) . 0 ,
42
43
parent_task_id: Task :: get_current( |t| t. id( ) . 0 ) . unwrap_or( 0 ) ,
43
44
} ) ;
@@ -53,7 +54,7 @@ impl Builder {
53
54
defer ! {
54
55
if log_enabled!( log:: Level :: Trace ) {
55
56
Task :: get_current( |t| {
56
- log :: trace!( "completed" , {
57
+ trace!( "completed" , {
57
58
task_id: t. id( ) . 0 ,
58
59
} ) ;
59
60
} ) ;
You can’t perform that action at this time.
0 commit comments