From 40e7be9a5c0016e29f3b3724303b448403cf52cf Mon Sep 17 00:00:00 2001 From: "zhuxiujia@qq.com" Date: Fri, 28 Jan 2022 20:53:50 +0800 Subject: [PATCH] use lazy replace lazy_static --- example/src/split_log.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/example/src/split_log.rs b/example/src/split_log.rs index 2e06820..e00082c 100644 --- a/example/src/split_log.rs +++ b/example/src/split_log.rs @@ -14,13 +14,9 @@ fn main(){ Box::new(LogPacker{}), true, ); - for _ in 0..12{ - std::thread::spawn(||{ - for _ in 0..2000000 { - log::info!("Commencing yak shaving"); - } - }); + for _ in 0..20000 { + log::info!("Commencing yak shaving"); } - sleep(Duration::from_secs(3*3600*3600)); + sleep(Duration::from_secs(3)); println!("you can see log files in path: {}","target/logs/") } \ No newline at end of file