fix on log after upgrade
This commit is contained in:
parent
e0bb25cbe5
commit
e26a838882
22
src/main.rs
22
src/main.rs
@ -43,16 +43,18 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
use flexi_logger::*;
|
use flexi_logger::*;
|
||||||
Logger::with_env_or_str("debug")
|
Logger::try_with_env_or_str("debug")
|
||||||
.log_to_file()
|
.map(|x| {
|
||||||
.format(opt_format)
|
x.log_to_file(FileSpec::default().directory(path))
|
||||||
.rotate(
|
.format(opt_format)
|
||||||
Criterion::Age(Age::Day),
|
.rotate(
|
||||||
Naming::Timestamps,
|
Criterion::Age(Age::Day),
|
||||||
Cleanup::KeepLogFiles(6),
|
Naming::Timestamps,
|
||||||
)
|
Cleanup::KeepLogFiles(6),
|
||||||
.directory(path)
|
)
|
||||||
.start()
|
.start()
|
||||||
|
.ok();
|
||||||
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
if args.is_empty() {
|
if args.is_empty() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user