From a66e233adf88237a6b584bef14bfcb7214e3ce1b Mon Sep 17 00:00:00 2001 From: gabrik Date: Thu, 18 Apr 2024 10:04:07 +0200 Subject: [PATCH] chore: using new try_init_log_from_env Signed-off-by: gabrik --- Cargo.lock | 54 ++++++++++++++++---------------- zenoh-bridge-ros2dds/src/main.rs | 2 +- zenoh-plugin-ros2dds/src/lib.rs | 4 +-- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86725ca..d99f46c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3998,7 +3998,7 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "ahash", "async-trait", @@ -4066,7 +4066,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "zenoh-collections", ] @@ -4074,7 +4074,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "serde", "tracing", @@ -4086,12 +4086,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" [[package]] name = "zenoh-config" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "flume", "json5", @@ -4111,7 +4111,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-global-executor", "lazy_static", @@ -4123,7 +4123,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "aes 0.8.3", "hmac 0.12.1", @@ -4136,7 +4136,7 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "bincode", "flume", @@ -4157,7 +4157,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -4171,7 +4171,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "zenoh-config", @@ -4189,7 +4189,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "flume", @@ -4212,7 +4212,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "base64 0.21.4", @@ -4240,7 +4240,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "tokio", @@ -4258,7 +4258,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "base64 0.21.4", @@ -4286,7 +4286,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "socket2 0.5.6", @@ -4307,7 +4307,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "futures", @@ -4327,7 +4327,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "futures-util", @@ -4348,7 +4348,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "proc-macro2", "quote", @@ -4359,7 +4359,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-rest" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "anyhow", "async-std", @@ -4414,7 +4414,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "const_format", "libloading", @@ -4430,7 +4430,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "const_format", "rand 0.8.5", @@ -4444,7 +4444,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "anyhow", ] @@ -4452,7 +4452,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "futures", "lazy_static", @@ -4464,7 +4464,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "event-listener 4.0.0", "futures", @@ -4478,7 +4478,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "futures", "tokio", @@ -4491,7 +4491,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-trait", "flume", @@ -4523,7 +4523,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#23c593297d5b4183d2eaa9596b2f3da8f5517b70" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#4f42ce780da20bd2a08c06bf5cbb5d6ad7db031d" dependencies = [ "async-std", "async-trait", diff --git a/zenoh-bridge-ros2dds/src/main.rs b/zenoh-bridge-ros2dds/src/main.rs index ca32a4c..378e1ca 100644 --- a/zenoh-bridge-ros2dds/src/main.rs +++ b/zenoh-bridge-ros2dds/src/main.rs @@ -60,7 +60,7 @@ fn parse_args() -> (Option, 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 diff --git a/zenoh-plugin-ros2dds/src/lib.rs b/zenoh-plugin-ros2dds/src/lib.rs index db998be..c3b2890 100644 --- a/zenoh-plugin-ros2dds/src/lib.rs +++ b/zenoh-plugin-ros2dds/src/lib.rs @@ -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 @@ -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);