mirror of
				https://github.com/0glabs/0g-storage-node.git
				synced 2025-11-04 08:37:27 +00:00 
			
		
		
		
	Add tokio console for debug. (#317)
It requires `tokio_unstable` in rust flags, so a `tokio-console` features is added to be compatible with the default config. To compile with the tokio console enabled, compile with ``RUSTFLAGS="--cfg tokio_unstable" cargo build --release --features tokio-console`` The usage of the tokio console can be found in https://github.com/tokio-rs/console.
This commit is contained in:
		
							parent
							
								
									9ce215b919
								
							
						
					
					
						commit
						d15ef5ba3d
					
				
							
								
								
									
										389
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										389
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							@ -453,6 +453,28 @@ dependencies = [
 | 
				
			|||||||
 "trust-dns-resolver",
 | 
					 "trust-dns-resolver",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "async-stream"
 | 
				
			||||||
 | 
					version = "0.3.6"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "async-stream-impl",
 | 
				
			||||||
 | 
					 "futures-core",
 | 
				
			||||||
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "async-stream-impl"
 | 
				
			||||||
 | 
					version = "0.3.6"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "proc-macro2",
 | 
				
			||||||
 | 
					 "quote",
 | 
				
			||||||
 | 
					 "syn 2.0.68",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "async-task"
 | 
					name = "async-task"
 | 
				
			||||||
version = "4.7.1"
 | 
					version = "4.7.1"
 | 
				
			||||||
@ -506,7 +528,7 @@ version = "0.16.3"
 | 
				
			|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
checksum = "fdb8867f378f33f78a811a8eb9bf108ad99430d7aad43315dd9319c827ef6247"
 | 
					checksum = "fdb8867f378f33f78a811a8eb9bf108ad99430d7aad43315dd9319c827ef6247"
 | 
				
			||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "log",
 | 
					 "log",
 | 
				
			||||||
 "url",
 | 
					 "url",
 | 
				
			||||||
 "wildmatch",
 | 
					 "wildmatch",
 | 
				
			||||||
@ -529,6 +551,53 @@ version = "1.3.0"
 | 
				
			|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
 | 
					checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "axum"
 | 
				
			||||||
 | 
					version = "0.7.5"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "async-trait",
 | 
				
			||||||
 | 
					 "axum-core",
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "futures-util",
 | 
				
			||||||
 | 
					 "http 1.2.0",
 | 
				
			||||||
 | 
					 "http-body 1.0.1",
 | 
				
			||||||
 | 
					 "http-body-util",
 | 
				
			||||||
 | 
					 "itoa",
 | 
				
			||||||
 | 
					 "matchit",
 | 
				
			||||||
 | 
					 "memchr",
 | 
				
			||||||
 | 
					 "mime",
 | 
				
			||||||
 | 
					 "percent-encoding",
 | 
				
			||||||
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 | 
					 "rustversion",
 | 
				
			||||||
 | 
					 "serde",
 | 
				
			||||||
 | 
					 "sync_wrapper 1.0.2",
 | 
				
			||||||
 | 
					 "tower",
 | 
				
			||||||
 | 
					 "tower-layer",
 | 
				
			||||||
 | 
					 "tower-service",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "axum-core"
 | 
				
			||||||
 | 
					version = "0.4.5"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "async-trait",
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "futures-util",
 | 
				
			||||||
 | 
					 "http 1.2.0",
 | 
				
			||||||
 | 
					 "http-body 1.0.1",
 | 
				
			||||||
 | 
					 "http-body-util",
 | 
				
			||||||
 | 
					 "mime",
 | 
				
			||||||
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 | 
					 "rustversion",
 | 
				
			||||||
 | 
					 "sync_wrapper 1.0.2",
 | 
				
			||||||
 | 
					 "tower-layer",
 | 
				
			||||||
 | 
					 "tower-service",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "backtrace"
 | 
					name = "backtrace"
 | 
				
			||||||
version = "0.3.73"
 | 
					version = "0.3.73"
 | 
				
			||||||
@ -568,6 +637,12 @@ version = "0.21.7"
 | 
				
			|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
 | 
					checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "base64"
 | 
				
			||||||
 | 
					version = "0.22.1"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "base64ct"
 | 
					name = "base64ct"
 | 
				
			||||||
version = "1.6.0"
 | 
					version = "1.6.0"
 | 
				
			||||||
@ -1104,6 +1179,45 @@ dependencies = [
 | 
				
			|||||||
 "yaml-rust",
 | 
					 "yaml-rust",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "console-api"
 | 
				
			||||||
 | 
					version = "0.8.1"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "8030735ecb0d128428b64cd379809817e620a40e5001c54465b99ec5feec2857"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "futures-core",
 | 
				
			||||||
 | 
					 "prost 0.13.4",
 | 
				
			||||||
 | 
					 "prost-types 0.13.4",
 | 
				
			||||||
 | 
					 "tonic",
 | 
				
			||||||
 | 
					 "tracing-core",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "console-subscriber"
 | 
				
			||||||
 | 
					version = "0.4.1"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "6539aa9c6a4cd31f4b1c040f860a1eac9aa80e7df6b05d506a6e7179936d6a01"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "console-api",
 | 
				
			||||||
 | 
					 "crossbeam-channel",
 | 
				
			||||||
 | 
					 "crossbeam-utils",
 | 
				
			||||||
 | 
					 "futures-task",
 | 
				
			||||||
 | 
					 "hdrhistogram",
 | 
				
			||||||
 | 
					 "humantime",
 | 
				
			||||||
 | 
					 "hyper-util",
 | 
				
			||||||
 | 
					 "prost 0.13.4",
 | 
				
			||||||
 | 
					 "prost-types 0.13.4",
 | 
				
			||||||
 | 
					 "serde",
 | 
				
			||||||
 | 
					 "serde_json",
 | 
				
			||||||
 | 
					 "thread_local",
 | 
				
			||||||
 | 
					 "tokio",
 | 
				
			||||||
 | 
					 "tokio-stream",
 | 
				
			||||||
 | 
					 "tonic",
 | 
				
			||||||
 | 
					 "tracing",
 | 
				
			||||||
 | 
					 "tracing-core",
 | 
				
			||||||
 | 
					 "tracing-subscriber",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "const-hex"
 | 
					name = "const-hex"
 | 
				
			||||||
version = "1.12.0"
 | 
					version = "1.12.0"
 | 
				
			||||||
@ -2286,7 +2400,7 @@ dependencies = [
 | 
				
			|||||||
 "futures-timer",
 | 
					 "futures-timer",
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "hashers",
 | 
					 "hashers",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "instant",
 | 
					 "instant",
 | 
				
			||||||
 "jsonwebtoken",
 | 
					 "jsonwebtoken",
 | 
				
			||||||
 "once_cell",
 | 
					 "once_cell",
 | 
				
			||||||
@ -2905,7 +3019,26 @@ dependencies = [
 | 
				
			|||||||
 "futures-core",
 | 
					 "futures-core",
 | 
				
			||||||
 "futures-sink",
 | 
					 "futures-sink",
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 | 
					 "indexmap 2.2.6",
 | 
				
			||||||
 | 
					 "slab",
 | 
				
			||||||
 | 
					 "tokio",
 | 
				
			||||||
 | 
					 "tokio-util 0.7.11",
 | 
				
			||||||
 | 
					 "tracing",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "h2"
 | 
				
			||||||
 | 
					version = "0.4.7"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "atomic-waker",
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "fnv",
 | 
				
			||||||
 | 
					 "futures-core",
 | 
				
			||||||
 | 
					 "futures-sink",
 | 
				
			||||||
 | 
					 "http 1.2.0",
 | 
				
			||||||
 "indexmap 2.2.6",
 | 
					 "indexmap 2.2.6",
 | 
				
			||||||
 "slab",
 | 
					 "slab",
 | 
				
			||||||
 "tokio",
 | 
					 "tokio",
 | 
				
			||||||
@ -3004,6 +3137,19 @@ dependencies = [
 | 
				
			|||||||
 "tokio-util 0.6.10",
 | 
					 "tokio-util 0.6.10",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "hdrhistogram"
 | 
				
			||||||
 | 
					version = "7.5.4"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "base64 0.21.7",
 | 
				
			||||||
 | 
					 "byteorder",
 | 
				
			||||||
 | 
					 "flate2",
 | 
				
			||||||
 | 
					 "nom",
 | 
				
			||||||
 | 
					 "num-traits",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "heck"
 | 
					name = "heck"
 | 
				
			||||||
version = "0.3.3"
 | 
					version = "0.3.3"
 | 
				
			||||||
@ -3125,6 +3271,17 @@ dependencies = [
 | 
				
			|||||||
 "itoa",
 | 
					 "itoa",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "http"
 | 
				
			||||||
 | 
					version = "1.2.0"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "fnv",
 | 
				
			||||||
 | 
					 "itoa",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "http-body"
 | 
					name = "http-body"
 | 
				
			||||||
version = "0.4.6"
 | 
					version = "0.4.6"
 | 
				
			||||||
@ -3132,7 +3289,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			|||||||
checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
 | 
					checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
 | 
				
			||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "bytes",
 | 
					 "bytes",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "http-body"
 | 
				
			||||||
 | 
					version = "1.0.1"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "http 1.2.0",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "http-body-util"
 | 
				
			||||||
 | 
					version = "0.1.2"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "futures-util",
 | 
				
			||||||
 | 
					 "http 1.2.0",
 | 
				
			||||||
 | 
					 "http-body 1.0.1",
 | 
				
			||||||
 "pin-project-lite 0.2.14",
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -3164,9 +3344,9 @@ dependencies = [
 | 
				
			|||||||
 "futures-channel",
 | 
					 "futures-channel",
 | 
				
			||||||
 "futures-core",
 | 
					 "futures-core",
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "h2",
 | 
					 "h2 0.3.26",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "http-body",
 | 
					 "http-body 0.4.6",
 | 
				
			||||||
 "httparse",
 | 
					 "httparse",
 | 
				
			||||||
 "httpdate",
 | 
					 "httpdate",
 | 
				
			||||||
 "itoa",
 | 
					 "itoa",
 | 
				
			||||||
@ -3178,14 +3358,35 @@ dependencies = [
 | 
				
			|||||||
 "want",
 | 
					 "want",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "hyper"
 | 
				
			||||||
 | 
					version = "1.5.2"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "futures-channel",
 | 
				
			||||||
 | 
					 "futures-util",
 | 
				
			||||||
 | 
					 "h2 0.4.7",
 | 
				
			||||||
 | 
					 "http 1.2.0",
 | 
				
			||||||
 | 
					 "http-body 1.0.1",
 | 
				
			||||||
 | 
					 "httparse",
 | 
				
			||||||
 | 
					 "httpdate",
 | 
				
			||||||
 | 
					 "itoa",
 | 
				
			||||||
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 | 
					 "smallvec",
 | 
				
			||||||
 | 
					 "tokio",
 | 
				
			||||||
 | 
					 "want",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "hyper-rustls"
 | 
					name = "hyper-rustls"
 | 
				
			||||||
version = "0.23.2"
 | 
					version = "0.23.2"
 | 
				
			||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
 | 
					checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
 | 
				
			||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "log",
 | 
					 "log",
 | 
				
			||||||
 "rustls 0.20.9",
 | 
					 "rustls 0.20.9",
 | 
				
			||||||
 "rustls-native-certs",
 | 
					 "rustls-native-certs",
 | 
				
			||||||
@ -3201,8 +3402,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			|||||||
checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
 | 
					checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
 | 
				
			||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "rustls 0.21.12",
 | 
					 "rustls 0.21.12",
 | 
				
			||||||
 "tokio",
 | 
					 "tokio",
 | 
				
			||||||
 "tokio-rustls 0.24.1",
 | 
					 "tokio-rustls 0.24.1",
 | 
				
			||||||
@ -3216,12 +3417,25 @@ checksum = "6eea26c5d0b6ab9d72219f65000af310f042a740926f7b2fa3553e774036e2e7"
 | 
				
			|||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "derive_builder",
 | 
					 "derive_builder",
 | 
				
			||||||
 "dns-lookup",
 | 
					 "dns-lookup",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "tokio",
 | 
					 "tokio",
 | 
				
			||||||
 "tower-service",
 | 
					 "tower-service",
 | 
				
			||||||
 "tracing",
 | 
					 "tracing",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "hyper-timeout"
 | 
				
			||||||
 | 
					version = "0.5.2"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "hyper 1.5.2",
 | 
				
			||||||
 | 
					 "hyper-util",
 | 
				
			||||||
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 | 
					 "tokio",
 | 
				
			||||||
 | 
					 "tower-service",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "hyper-tls"
 | 
					name = "hyper-tls"
 | 
				
			||||||
version = "0.5.0"
 | 
					version = "0.5.0"
 | 
				
			||||||
@ -3229,12 +3443,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			|||||||
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
 | 
					checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
 | 
				
			||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "bytes",
 | 
					 "bytes",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "native-tls",
 | 
					 "native-tls",
 | 
				
			||||||
 "tokio",
 | 
					 "tokio",
 | 
				
			||||||
 "tokio-native-tls",
 | 
					 "tokio-native-tls",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "hyper-util"
 | 
				
			||||||
 | 
					version = "0.1.10"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "futures-channel",
 | 
				
			||||||
 | 
					 "futures-util",
 | 
				
			||||||
 | 
					 "http 1.2.0",
 | 
				
			||||||
 | 
					 "http-body 1.0.1",
 | 
				
			||||||
 | 
					 "hyper 1.5.2",
 | 
				
			||||||
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 | 
					 "socket2 0.5.7",
 | 
				
			||||||
 | 
					 "tokio",
 | 
				
			||||||
 | 
					 "tower-service",
 | 
				
			||||||
 | 
					 "tracing",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "iana-time-zone"
 | 
					name = "iana-time-zone"
 | 
				
			||||||
version = "0.1.60"
 | 
					version = "0.1.60"
 | 
				
			||||||
@ -3586,7 +3819,7 @@ dependencies = [
 | 
				
			|||||||
 "futures-timer",
 | 
					 "futures-timer",
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "gloo-net",
 | 
					 "gloo-net",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "jsonrpsee-core",
 | 
					 "jsonrpsee-core",
 | 
				
			||||||
 "jsonrpsee-types",
 | 
					 "jsonrpsee-types",
 | 
				
			||||||
 "pin-project 1.1.5",
 | 
					 "pin-project 1.1.5",
 | 
				
			||||||
@ -3615,7 +3848,7 @@ dependencies = [
 | 
				
			|||||||
 "futures-timer",
 | 
					 "futures-timer",
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "globset",
 | 
					 "globset",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "jsonrpsee-types",
 | 
					 "jsonrpsee-types",
 | 
				
			||||||
 "lazy_static",
 | 
					 "lazy_static",
 | 
				
			||||||
 "parking_lot 0.12.3",
 | 
					 "parking_lot 0.12.3",
 | 
				
			||||||
@ -3638,7 +3871,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			|||||||
checksum = "5fc1d8c0e4f455c47df21f8a29f4bbbcb75eb71bfee919b92e92502b48358392"
 | 
					checksum = "5fc1d8c0e4f455c47df21f8a29f4bbbcb75eb71bfee919b92e92502b48358392"
 | 
				
			||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "async-trait",
 | 
					 "async-trait",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "hyper-rustls 0.23.2",
 | 
					 "hyper-rustls 0.23.2",
 | 
				
			||||||
 "jsonrpsee-core",
 | 
					 "jsonrpsee-core",
 | 
				
			||||||
 "jsonrpsee-types",
 | 
					 "jsonrpsee-types",
 | 
				
			||||||
@ -3658,7 +3891,7 @@ checksum = "bdd69efeb3ce2cba767f126872f4eeb4624038a29098e75d77608b2b4345ad03"
 | 
				
			|||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "futures-channel",
 | 
					 "futures-channel",
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "jsonrpsee-core",
 | 
					 "jsonrpsee-core",
 | 
				
			||||||
 "jsonrpsee-types",
 | 
					 "jsonrpsee-types",
 | 
				
			||||||
 "serde",
 | 
					 "serde",
 | 
				
			||||||
@ -4713,6 +4946,12 @@ version = "0.1.10"
 | 
				
			|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
 | 
					checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "matchit"
 | 
				
			||||||
 | 
					version = "0.7.3"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "md-5"
 | 
					name = "md-5"
 | 
				
			||||||
version = "0.10.6"
 | 
					version = "0.10.6"
 | 
				
			||||||
@ -6025,6 +6264,16 @@ dependencies = [
 | 
				
			|||||||
 "prost-derive 0.10.1",
 | 
					 "prost-derive 0.10.1",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "prost"
 | 
				
			||||||
 | 
					version = "0.13.4"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "prost-derive 0.13.4",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "prost-build"
 | 
					name = "prost-build"
 | 
				
			||||||
version = "0.9.0"
 | 
					version = "0.9.0"
 | 
				
			||||||
@ -6106,6 +6355,19 @@ dependencies = [
 | 
				
			|||||||
 "syn 1.0.109",
 | 
					 "syn 1.0.109",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "prost-derive"
 | 
				
			||||||
 | 
					version = "0.13.4"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "anyhow",
 | 
				
			||||||
 | 
					 "itertools 0.13.0",
 | 
				
			||||||
 | 
					 "proc-macro2",
 | 
				
			||||||
 | 
					 "quote",
 | 
				
			||||||
 | 
					 "syn 2.0.68",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "prost-types"
 | 
					name = "prost-types"
 | 
				
			||||||
version = "0.9.0"
 | 
					version = "0.9.0"
 | 
				
			||||||
@ -6126,6 +6388,15 @@ dependencies = [
 | 
				
			|||||||
 "prost 0.10.4",
 | 
					 "prost 0.10.4",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "prost-types"
 | 
				
			||||||
 | 
					version = "0.13.4"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "cc2f1e56baa61e93533aebc21af4d2134b70f66275e0fcdf3cbe43d77ff7e8fc"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "prost 0.13.4",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "protobuf"
 | 
					name = "protobuf"
 | 
				
			||||||
version = "2.28.0"
 | 
					version = "2.28.0"
 | 
				
			||||||
@ -6159,8 +6430,8 @@ dependencies = [
 | 
				
			|||||||
 "dns-lookup",
 | 
					 "dns-lookup",
 | 
				
			||||||
 "futures-core",
 | 
					 "futures-core",
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "hyper-system-resolver",
 | 
					 "hyper-system-resolver",
 | 
				
			||||||
 "pin-project-lite 0.2.14",
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 "thiserror",
 | 
					 "thiserror",
 | 
				
			||||||
@ -6403,10 +6674,10 @@ dependencies = [
 | 
				
			|||||||
 "encoding_rs",
 | 
					 "encoding_rs",
 | 
				
			||||||
 "futures-core",
 | 
					 "futures-core",
 | 
				
			||||||
 "futures-util",
 | 
					 "futures-util",
 | 
				
			||||||
 "h2",
 | 
					 "h2 0.3.26",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "http-body",
 | 
					 "http-body 0.4.6",
 | 
				
			||||||
 "hyper",
 | 
					 "hyper 0.14.29",
 | 
				
			||||||
 "hyper-rustls 0.24.2",
 | 
					 "hyper-rustls 0.24.2",
 | 
				
			||||||
 "hyper-tls",
 | 
					 "hyper-tls",
 | 
				
			||||||
 "ipnet",
 | 
					 "ipnet",
 | 
				
			||||||
@ -6422,7 +6693,7 @@ dependencies = [
 | 
				
			|||||||
 "serde",
 | 
					 "serde",
 | 
				
			||||||
 "serde_json",
 | 
					 "serde_json",
 | 
				
			||||||
 "serde_urlencoded",
 | 
					 "serde_urlencoded",
 | 
				
			||||||
 "sync_wrapper",
 | 
					 "sync_wrapper 0.1.2",
 | 
				
			||||||
 "system-configuration",
 | 
					 "system-configuration",
 | 
				
			||||||
 "tokio",
 | 
					 "tokio",
 | 
				
			||||||
 "tokio-native-tls",
 | 
					 "tokio-native-tls",
 | 
				
			||||||
@ -7497,6 +7768,12 @@ version = "0.1.2"
 | 
				
			|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
 | 
					checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "sync_wrapper"
 | 
				
			||||||
 | 
					version = "1.0.2"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "synstructure"
 | 
					name = "synstructure"
 | 
				
			||||||
version = "0.12.6"
 | 
					version = "0.12.6"
 | 
				
			||||||
@ -7729,6 +8006,7 @@ dependencies = [
 | 
				
			|||||||
 "signal-hook-registry",
 | 
					 "signal-hook-registry",
 | 
				
			||||||
 "socket2 0.5.7",
 | 
					 "socket2 0.5.7",
 | 
				
			||||||
 "tokio-macros",
 | 
					 "tokio-macros",
 | 
				
			||||||
 | 
					 "tracing",
 | 
				
			||||||
 "windows-sys 0.48.0",
 | 
					 "windows-sys 0.48.0",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -7786,9 +8064,9 @@ dependencies = [
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "tokio-stream"
 | 
					name = "tokio-stream"
 | 
				
			||||||
version = "0.1.15"
 | 
					version = "0.1.17"
 | 
				
			||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af"
 | 
					checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
 | 
				
			||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
 "futures-core",
 | 
					 "futures-core",
 | 
				
			||||||
 "pin-project-lite 0.2.14",
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
@ -7895,6 +8173,62 @@ dependencies = [
 | 
				
			|||||||
 "winnow 0.6.13",
 | 
					 "winnow 0.6.13",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "tonic"
 | 
				
			||||||
 | 
					version = "0.12.3"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "async-stream",
 | 
				
			||||||
 | 
					 "async-trait",
 | 
				
			||||||
 | 
					 "axum",
 | 
				
			||||||
 | 
					 "base64 0.22.1",
 | 
				
			||||||
 | 
					 "bytes",
 | 
				
			||||||
 | 
					 "h2 0.4.7",
 | 
				
			||||||
 | 
					 "http 1.2.0",
 | 
				
			||||||
 | 
					 "http-body 1.0.1",
 | 
				
			||||||
 | 
					 "http-body-util",
 | 
				
			||||||
 | 
					 "hyper 1.5.2",
 | 
				
			||||||
 | 
					 "hyper-timeout",
 | 
				
			||||||
 | 
					 "hyper-util",
 | 
				
			||||||
 | 
					 "percent-encoding",
 | 
				
			||||||
 | 
					 "pin-project 1.1.5",
 | 
				
			||||||
 | 
					 "prost 0.13.4",
 | 
				
			||||||
 | 
					 "socket2 0.5.7",
 | 
				
			||||||
 | 
					 "tokio",
 | 
				
			||||||
 | 
					 "tokio-stream",
 | 
				
			||||||
 | 
					 "tower",
 | 
				
			||||||
 | 
					 "tower-layer",
 | 
				
			||||||
 | 
					 "tower-service",
 | 
				
			||||||
 | 
					 "tracing",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "tower"
 | 
				
			||||||
 | 
					version = "0.4.13"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
 | 
				
			||||||
 | 
					dependencies = [
 | 
				
			||||||
 | 
					 "futures-core",
 | 
				
			||||||
 | 
					 "futures-util",
 | 
				
			||||||
 | 
					 "indexmap 1.9.3",
 | 
				
			||||||
 | 
					 "pin-project 1.1.5",
 | 
				
			||||||
 | 
					 "pin-project-lite 0.2.14",
 | 
				
			||||||
 | 
					 "rand 0.8.5",
 | 
				
			||||||
 | 
					 "slab",
 | 
				
			||||||
 | 
					 "tokio",
 | 
				
			||||||
 | 
					 "tokio-util 0.7.11",
 | 
				
			||||||
 | 
					 "tower-layer",
 | 
				
			||||||
 | 
					 "tower-service",
 | 
				
			||||||
 | 
					 "tracing",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "tower-layer"
 | 
				
			||||||
 | 
					version = "0.3.3"
 | 
				
			||||||
 | 
					source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
				
			||||||
 | 
					checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "tower-service"
 | 
					name = "tower-service"
 | 
				
			||||||
version = "0.3.2"
 | 
					version = "0.3.2"
 | 
				
			||||||
@ -8124,7 +8458,7 @@ dependencies = [
 | 
				
			|||||||
 "byteorder",
 | 
					 "byteorder",
 | 
				
			||||||
 "bytes",
 | 
					 "bytes",
 | 
				
			||||||
 "data-encoding",
 | 
					 "data-encoding",
 | 
				
			||||||
 "http",
 | 
					 "http 0.2.12",
 | 
				
			||||||
 "httparse",
 | 
					 "httparse",
 | 
				
			||||||
 "log",
 | 
					 "log",
 | 
				
			||||||
 "rand 0.8.5",
 | 
					 "rand 0.8.5",
 | 
				
			||||||
@ -8922,6 +9256,7 @@ dependencies = [
 | 
				
			|||||||
 "chunk_pool",
 | 
					 "chunk_pool",
 | 
				
			||||||
 "clap",
 | 
					 "clap",
 | 
				
			||||||
 "config",
 | 
					 "config",
 | 
				
			||||||
 | 
					 "console-subscriber",
 | 
				
			||||||
 "ctrlc",
 | 
					 "ctrlc",
 | 
				
			||||||
 "duration-str",
 | 
					 "duration-str",
 | 
				
			||||||
 "error-chain",
 | 
					 "error-chain",
 | 
				
			||||||
 | 
				
			|||||||
@ -42,8 +42,12 @@ metrics = { workspace = true }
 | 
				
			|||||||
rust-log = { package = "log", version = "0.4.22" }
 | 
					rust-log = { package = "log", version = "0.4.22" }
 | 
				
			||||||
tracing-core = "0.1.32"
 | 
					tracing-core = "0.1.32"
 | 
				
			||||||
tracing-log = "0.2.0"
 | 
					tracing-log = "0.2.0"
 | 
				
			||||||
 | 
					console-subscriber = { version = "0.4.1", optional = true }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.libp2p]
 | 
					[dependencies.libp2p]
 | 
				
			||||||
version = "0.45.1"
 | 
					version = "0.45.1"
 | 
				
			||||||
default-features = true
 | 
					default-features = true
 | 
				
			||||||
features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns-tokio", "tcp-tokio", "plaintext", "secp256k1"]
 | 
					features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns-tokio", "tcp-tokio", "plaintext", "secp256k1"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[features]
 | 
				
			||||||
 | 
					tokio-console = ["console-subscriber"]
 | 
				
			||||||
@ -1,7 +1,8 @@
 | 
				
			|||||||
use task_executor::TaskExecutor;
 | 
					use task_executor::TaskExecutor;
 | 
				
			||||||
use tracing::Level;
 | 
					 | 
				
			||||||
use tracing_log::AsLog;
 | 
					use tracing_log::AsLog;
 | 
				
			||||||
use tracing_subscriber::EnvFilter;
 | 
					use tracing_subscriber::layer::SubscriberExt;
 | 
				
			||||||
 | 
					use tracing_subscriber::util::SubscriberInitExt;
 | 
				
			||||||
 | 
					use tracing_subscriber::{EnvFilter, Layer};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const LOG_RELOAD_PERIOD_SEC: u64 = 30;
 | 
					const LOG_RELOAD_PERIOD_SEC: u64 = 30;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -15,19 +16,26 @@ pub fn configure(log_level_file: &str, log_directory: &str, executor: TaskExecut
 | 
				
			|||||||
        .unwrap_or_default()
 | 
					        .unwrap_or_default()
 | 
				
			||||||
        .trim_end()
 | 
					        .trim_end()
 | 
				
			||||||
        .to_string();
 | 
					        .to_string();
 | 
				
			||||||
 | 
					    let filter = EnvFilter::try_new(config.clone()).expect("invalid log level");
 | 
				
			||||||
 | 
					    let (filter, reload_handle) = tracing_subscriber::reload::Layer::new(filter);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let builder = tracing_subscriber::fmt()
 | 
					    let fmt_layer = tracing_subscriber::fmt::layer()
 | 
				
			||||||
        .with_max_level(Level::TRACE)
 | 
					 | 
				
			||||||
        .with_env_filter(EnvFilter::try_new(config.clone()).expect("invalid log level"))
 | 
					 | 
				
			||||||
        .with_writer(non_blocking)
 | 
					        .with_writer(non_blocking)
 | 
				
			||||||
        .with_ansi(false)
 | 
					        .with_ansi(false)
 | 
				
			||||||
        // .with_file(true)
 | 
					        .compact()
 | 
				
			||||||
        // .with_line_number(true)
 | 
					        .with_filter(filter);
 | 
				
			||||||
        // .with_thread_names(true)
 | 
					    // .with_file(true)
 | 
				
			||||||
        .with_filter_reloading();
 | 
					    // .with_line_number(true)
 | 
				
			||||||
 | 
					    // .with_thread_names(true)
 | 
				
			||||||
    let handle = builder.reload_handle();
 | 
					    let subscriber = tracing_subscriber::registry().with(fmt_layer);
 | 
				
			||||||
    builder.init();
 | 
					    #[cfg(feature = "tokio-console")]
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        subscriber.with(console_subscriber::spawn()).init();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    #[cfg(not(feature = "tokio-console"))]
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        subscriber.init();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // periodically check for config changes
 | 
					    // periodically check for config changes
 | 
				
			||||||
    executor.spawn(
 | 
					    executor.spawn(
 | 
				
			||||||
@ -57,7 +65,7 @@ pub fn configure(log_level_file: &str, log_directory: &str, executor: TaskExecut
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                println!("Updating log config to {:?}", new_config);
 | 
					                println!("Updating log config to {:?}", new_config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                match handle.reload(&new_config) {
 | 
					                match reload_handle.reload(&new_config) {
 | 
				
			||||||
                    Ok(()) => {
 | 
					                    Ok(()) => {
 | 
				
			||||||
                        rust_log::set_max_level(tracing_core::LevelFilter::current().as_log());
 | 
					                        rust_log::set_max_level(tracing_core::LevelFilter::current().as_log());
 | 
				
			||||||
                        config = new_config
 | 
					                        config = new_config
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user