Skip to content

Commit

Permalink
Fix libvcx logger regression
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Mircea <[email protected]>
  • Loading branch information
bobozaur committed Oct 18, 2023
1 parent 42daf81 commit b35b0b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aries_vcx/src/utils/test_logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ fn text_no_color_format(buf: &mut Formatter, record: &Record) -> std::io::Result

impl LibvcxDefaultLogger {
pub fn init_testing_logger() {
LibvcxDefaultLogger::init(env::var("RUST_LOG").ok())
.expect("Failed to initialize LibvcxDefaultLogger for testing");
if let Ok(log_pattern) = env::var("RUST_LOG") {
LibvcxDefaultLogger::init(Some(log_pattern))
.expect("Failed to initialize LibvcxDefaultLogger for testing")
}
}

pub fn init(pattern: Option<String>) -> VcxResult<()> {
Expand Down

0 comments on commit b35b0b2

Please sign in to comment.