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;
88use std:: io;
99use tokio:: { io:: DuplexStream , task:: JoinHandle } ;
1010
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-
3611type TokioDuplex = tokio_util:: compat:: Compat < DuplexStream > ;
3712
3813pub ( crate ) fn duplex ( channel_size : usize ) -> ( TokioDuplex , TokioDuplex ) {
11186 } )
11287}
11388
114- #[ allow( unused) ]
11589pub async fn wait_for_localhost_port ( port : u32 ) {
11690 const RETRY_TIMEOUT : u64 = 100_u64 ;
11791 const NO_RESPONSE_TIMEOUT : u64 = 1000_u64 ;
You can’t perform that action at this time.
0 commit comments