From fec652844906c13d1f5f8cd9ba9f14e581b96a4d Mon Sep 17 00:00:00 2001 From: Kailai Wang Date: Fri, 31 May 2024 08:39:08 +0000 Subject: [PATCH] lenient log --- tee-worker/enclave-runtime/src/lib.rs | 42 +++++++++++++++------------ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/tee-worker/enclave-runtime/src/lib.rs b/tee-worker/enclave-runtime/src/lib.rs index c6b9491222..8341021345 100644 --- a/tee-worker/enclave-runtime/src/lib.rs +++ b/tee-worker/enclave-runtime/src/lib.rs @@ -133,25 +133,29 @@ pub unsafe extern "C" fn init( encoded_base_dir_size: u32, ) -> sgx_status_t { // Initialize the logging environment in the enclave. - if_development_or!( - env_logger::builder() - .format_timestamp(Some(env_logger::TimestampPrecision::Micros)) - .init(), - { - let module_names = litentry_proc_macros::local_modules!(); - println!( - "Initializing logger to filter only following local modules: {:?}", - module_names - ); - let mut builder = env_logger::Builder::new(); - builder.format_timestamp(Some(env_logger::TimestampPrecision::Micros)); - builder.filter(None, LevelFilter::Off); - module_names.into_iter().for_each(|module| { - builder.filter(Some(module), LevelFilter::Info); - }); - builder.init(); - } - ); + // if_development_or!( + // env_logger::builder() + // .format_timestamp(Some(env_logger::TimestampPrecision::Micros)) + // .init(), + // { + // let module_names = litentry_proc_macros::local_modules!(); + // println!( + // "Initializing logger to filter only following local modules: {:?}", + // module_names + // ); + // let mut builder = env_logger::Builder::new(); + // builder.format_timestamp(Some(env_logger::TimestampPrecision::Micros)); + // builder.filter(None, LevelFilter::Off); + // module_names.into_iter().for_each(|module| { + // builder.filter(Some(module), LevelFilter::Info); + // }); + // builder.init(); + // } + // ); + + env_logger::builder() + .format_timestamp(Some(env_logger::TimestampPrecision::Micros)) + .init(); let mu_ra_url = match String::decode(&mut slice::from_raw_parts(mu_ra_addr, mu_ra_addr_size as usize))