File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -8,31 +8,6 @@ use instant::Duration;
8
8
use std:: io;
9
9
use tokio:: { io:: DuplexStream , task:: JoinHandle } ;
10
10
11
- #[ allow( unused) ]
12
- pub ( crate ) fn log ( ) {
13
- static START_LOGS : std:: sync:: OnceLock < ( ) > = std:: sync:: OnceLock :: new ( ) ;
14
- START_LOGS . get_or_init ( || {
15
- use tracing_subscriber:: {
16
- layer:: SubscriberExt as _, util:: SubscriberInitExt as _, EnvFilter ,
17
- } ;
18
- let env_filter = EnvFilter :: from_default_env ( ) ; // Reads `RUST_LOG` environment variable
19
-
20
- // Create the hierarchical layer from tracing_tree
21
- let tree_layer = tracing_tree:: HierarchicalLayer :: new ( 2 ) // 2 spaces per indent level
22
- . with_targets ( true )
23
- . with_bracketed_fields ( true )
24
- . with_indent_lines ( true )
25
- . with_span_modes ( true )
26
- . with_thread_ids ( false )
27
- . with_thread_names ( false ) ;
28
-
29
- tracing_subscriber:: registry ( )
30
- . with ( env_filter)
31
- . with ( tree_layer)
32
- . init ( ) ;
33
- } ) ;
34
- }
35
-
36
11
type TokioDuplex = tokio_util:: compat:: Compat < DuplexStream > ;
37
12
38
13
pub ( crate ) fn duplex ( channel_size : usize ) -> ( TokioDuplex , TokioDuplex ) {
111
86
} )
112
87
}
113
88
114
- #[ allow( unused) ]
115
89
pub async fn wait_for_localhost_port ( port : u32 ) {
116
90
const RETRY_TIMEOUT : u64 = 100_u64 ;
117
91
const NO_RESPONSE_TIMEOUT : u64 = 1000_u64 ;
You can’t perform that action at this time.
0 commit comments