这下应该好了

This commit is contained in:
shenjack-5600u 2024-02-10 12:45:34 +08:00
parent 88c59b7c49
commit 19de0314df
Signed by: shenjack
GPG Key ID: FDF9864E11C7E79F
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,5 @@
use tracing::warn;
pub fn init_log_with_cli() {
// 命令行参数
// --warn
@ -5,7 +7,11 @@ pub fn init_log_with_cli() {
// --trace
// 从低级开始判断
tracing_subscriber::fmt()
let trace = tracing_subscriber::fmt()
.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());
}
}

View File

@ -15,6 +15,3 @@ toml = "0.8.8"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["time"] }
[patch.crates-io]
rust_socketio = { git = "https://github.com/shenjackyuanjie/rust-socketio.git", branch = "mult_payload" }