Skip to content

Commit

Permalink
chore: using new try_init_log_from_env
Browse files Browse the repository at this point in the history
Signed-off-by: gabrik <[email protected]>
  • Loading branch information
gabrik committed Apr 18, 2024
1 parent 25f4aae commit a66e233
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion zenoh-bridge-ros2dds/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn parse_args() -> (Option<f32>, Config) {

#[async_std::main]
async fn main() {
zenoh_util::init_log_from_env();
zenoh_util::try_init_log_from_env();
tracing::info!(
"zenoh-bridge-ros2dds {}",
zenoh_plugin_ros2dds::ROS2Plugin::PLUGIN_LONG_VERSION
Expand Down
4 changes: 2 additions & 2 deletions zenoh-plugin-ros2dds/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl Plugin for ROS2Plugin {
// Try to initiate login.
// Required in case of dynamic lib, otherwise no logs.
// But cannot be done twice in case of static link.
zenoh_util::init_log_from_env();
zenoh_util::try_init_log_from_env();

let runtime_conf = runtime.config().lock();
let plugin_conf = runtime_conf
Expand All @@ -141,7 +141,7 @@ pub async fn run(runtime: Runtime, config: Config) {
// Try to initiate login.
// Required in case of dynamic lib, otherwise no logs.
// But cannot be done twice in case of static link.
zenoh_util::init_log_from_env();
zenoh_util::try_init_log_from_env();
tracing::debug!("ROS2 plugin {}", ROS2Plugin::PLUGIN_VERSION);
tracing::info!("ROS2 plugin {:?}", config);

Expand Down

0 comments on commit a66e233

Please sign in to comment.