Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion zenoh-jni/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ use crate::{errors::ZResult, throw_exception, zerror};
///
/// This function is meant to be called from Java/Kotlin code through JNI. It takes a `filter`
/// indicating the desired log level.
/// If the logger was already initialized in a previous call, then it does nothing.

///
/// See https://docs.rs/env_logger/latest/env_logger/index.html for accepted filter format.
///
Expand All @@ -47,7 +49,8 @@ pub extern "C" fn Java_io_zenoh_Logger_00024Companion_startLogsViaJNI(
.parse_filters(log_level.as_str())
.tag_target_strip()
.prepend_module(true)
.init();
.try_init()
.ok();
Ok(())
}()
.unwrap_or_else(|err| throw_exception!(env, err))
Expand Down
Loading