changed back to log

This commit is contained in:
asxalex 2025-02-06 10:16:37 +08:00
parent 7e5792e190
commit 3f6da7c65e
3 changed files with 11 additions and 24 deletions

15
Cargo.lock generated
View File

@ -1374,18 +1374,6 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rolling-file"
version = "0.1.0"
dependencies = [
"anyhow",
"chrono",
"time",
"tracing",
"tracing-appender",
"tracing-subscriber",
]
[[package]] [[package]]
name = "rolling-file" name = "rolling-file"
version = "0.1.0" version = "0.1.0"
@ -1466,7 +1454,6 @@ dependencies = [
"prost", "prost",
"prost-build", "prost-build",
"rand", "rand",
"rolling-file 0.1.0",
"rsa", "rsa",
"sdlan-sn-rs", "sdlan-sn-rs",
"structopt", "structopt",
@ -1489,7 +1476,7 @@ dependencies = [
"once_cell", "once_cell",
"prost", "prost",
"rand", "rand",
"rolling-file 0.1.0 (git+ssh://git@git.asxalex.pw/rust/rolling-file.git)", "rolling-file",
"rsa", "rsa",
"serde", "serde",
"serde_json", "serde_json",

View File

@ -23,7 +23,7 @@ structopt = "0.3.26"
tokio = { version = "1.38.0", features = ["full"] } tokio = { version = "1.38.0", features = ["full"] }
tokio-util = "0.7.11" tokio-util = "0.7.11"
tracing = "0.1.40" tracing = "0.1.40"
rolling-file = { path = "../rolling-file" } # rolling-file = { path = "../rolling-file" }
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
wintun = "0.4.0" wintun = "0.4.0"

View File

@ -11,15 +11,15 @@ use structopt::StructOpt;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
let _guard = rolling_file::new_log( // let _guard = rolling_file::new_log(
"./.output", // "./.output",
7, // 7,
rolling_file::PeriodGap::Daily, // rolling_file::PeriodGap::Daily,
tracing::Level::DEBUG, // tracing::Level::DEBUG,
true, // true,
true, // true,
); // );
// let _guard = log::init_log(); let _guard = log::init_log();
let cmd = CommandLineInput::from_args(); let cmd = CommandLineInput::from_args();