这下应该好了
This commit is contained in:
parent
88c59b7c49
commit
19de0314df
10
src/log.rs
10
src/log.rs
@ -1,3 +1,5 @@
|
|||||||
|
use tracing::warn;
|
||||||
|
|
||||||
pub fn init_log_with_cli() {
|
pub fn init_log_with_cli() {
|
||||||
// 命令行参数
|
// 命令行参数
|
||||||
// --warn
|
// --warn
|
||||||
@ -5,7 +7,11 @@ pub fn init_log_with_cli() {
|
|||||||
// --trace
|
// --trace
|
||||||
// 从低级开始判断
|
// 从低级开始判断
|
||||||
|
|
||||||
tracing_subscriber::fmt()
|
let trace = tracing_subscriber::fmt()
|
||||||
.with_max_level(tracing::Level::DEBUG)
|
.with_max_level(tracing::Level::DEBUG)
|
||||||
.init();
|
.with_line_number(true)
|
||||||
|
.try_init();
|
||||||
|
if trace.is_err() {
|
||||||
|
warn!("init log with trace failed: {:?}", trace.err());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,3 @@ toml = "0.8.8"
|
|||||||
|
|
||||||
tracing = "0.1.40"
|
tracing = "0.1.40"
|
||||||
tracing-subscriber = { version = "0.3.18", features = ["time"] }
|
tracing-subscriber = { version = "0.3.18", features = ["time"] }
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
rust_socketio = { git = "https://github.com/shenjackyuanjie/rust-socketio.git", branch = "mult_payload" }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user