cyfs_debug/
lib.rs

1mod bug_report;
2mod debug_config;
3mod log;
4mod log_util;
5mod panic;
6mod dump;
7
8#[cfg(feature = "http_report")]
9mod http_target;
10
11#[macro_use]
12mod check;
13
14pub use crate::log::*;
15pub use check::*;
16pub use debug_config::*;
17pub use log_util::*;
18pub use panic::*;
19pub use dump::*;
20pub use bug_report::PanicReportRequest;
21
22#[cfg(feature = "http_report")]
23pub use http_target::*;
24
25
26#[cfg(test)]
27mod tests {
28    use crate::*;
29
30    #[test]
31    fn test_log() {
32        CyfsLoggerBuilder::new_app("test-cyfs-debug")
33            .level("trace")
34            .console("trace")
35            .enable_bdt(Some("warn"), Some("warn"))
36            .build()
37            .unwrap()
38            .start();
39
40        info!("create minidump file");
41        let helper = dump::DumpHelper::get_instance();
42        helper.dump();
43    }
44}
45
46#[macro_use]
47extern crate log as _log;