Skip to content

Commit

Permalink
Fix module name
Browse files Browse the repository at this point in the history
  • Loading branch information
donnie4w committed Dec 12, 2024
1 parent 75bee09 commit f4854b4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_0_2_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ mod module2 {

#[test]
fn testmod() {
tklog::LOG.set_mod_option("test_0210::module1::*", LogOption { level: None, format: None, formatter: None, console: Some(true), fileoption: Some(Box::new(FileTimeMode::new("syncmodule1.log", tklog::MODE::DAY, 0, true))) });
tklog::LOG.set_mod_option("test_0_2_1::module1::*", LogOption { level: None, format: None, formatter: None, console: Some(true), fileoption: Some(Box::new(FileTimeMode::new("syncmodule1.log", tklog::MODE::DAY, 0, true))) });
module1::testmod();
module1::m1::testmod();
module1::m2::testmod();
module2::testmod();
std::thread::sleep(std::time::Duration::from_secs(1))
}

mod module3 {
Expand Down Expand Up @@ -66,8 +67,8 @@ mod module4 {

#[tokio::test]
async fn testasyncmod() {
tklog::ASYNC_LOG.set_mod_option("test_0210::module3::*", LogOption { level: None, format: None, formatter: None, console: Some(true), fileoption: Some(Box::new(FileTimeMode::new("asyncmodule2.log", tklog::MODE::DAY, 0, true))) }).await;
tklog::ASYNC_LOG.set_mod_option("test_0210::module4", LogOption { level: None, format: None, formatter: None, console: Some(true), fileoption: Some(Box::new(FileTimeMode::new("asyncmodule2.log", tklog::MODE::DAY, 0, true))) }).await;
tklog::ASYNC_LOG.set_mod_option("test_0_2_1::module3::*", LogOption { level: None, format: None, formatter: None, console: Some(true), fileoption: Some(Box::new(FileTimeMode::new("asyncmodule2.log", tklog::MODE::DAY, 0, true))) }).await;
tklog::ASYNC_LOG.set_mod_option("test_0_2_1::module4", LogOption { level: None, format: None, formatter: None, console: Some(true), fileoption: Some(Box::new(FileTimeMode::new("asyncmodule2.log", tklog::MODE::DAY, 0, true))) }).await;
module3::testmod().await;
module3::m3::testmod().await;
module3::m4::testmod().await;
Expand Down

0 comments on commit f4854b4

Please sign in to comment.