File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff 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 }
5758futures-core = { version = " 0.3.1" , optional = true }
5859futures-io = { version = " 0.3.1" , optional = true }
5960futures-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 }
6163memchr = { version = " 2.2.1" , optional = true }
6264mio = { version = " 0.6.19" , optional = true }
6365mio-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};
66use std:: thread;
77
88use crossbeam_utils:: sync:: Parker ;
9+ use kv_log_macro:: trace;
910use log:: log_enabled;
1011
1112use crate :: task:: { Context , Poll , Task , Waker } ;
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 } ) ;
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 } ) ;
Original file line number Diff line number Diff line change 1+ use kv_log_macro:: trace;
12use log:: log_enabled;
23use 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 } ) ;
You can’t perform that action at this time.
0 commit comments