From 103c9801af35482a33ddc0976c08e452d19ba7b5 Mon Sep 17 00:00:00 2001 From: gabrik Date: Wed, 3 Apr 2024 12:44:22 +0200 Subject: [PATCH 1/4] feat(tracing): using tracing and zenoh-util init_log Signed-off-by: gabrik --- Cargo.toml | 11 ++++--- src/attachment.rs | 2 +- src/closures/hello_closure.rs | 2 +- src/closures/matching_status_closure.rs | 2 +- src/closures/query_channel.rs | 10 +++---- src/closures/query_closure.rs | 4 +-- src/closures/reply_closure.rs | 2 +- src/closures/response_channel.rs | 10 +++---- src/closures/sample_closure.rs | 2 +- src/closures/zenohid_closure.rs | 2 +- src/config.rs | 6 ++-- src/get.rs | 4 +-- src/keyexpr.rs | 38 ++++++++++++------------- src/lib.rs | 2 +- src/liveliness.rs | 14 ++++----- src/publication_cache.rs | 6 ++-- src/publisher.rs | 16 +++++------ src/pull_subscriber.rs | 8 +++--- src/put.rs | 14 ++++----- src/queryable.rs | 10 +++---- src/querying_subscriber.rs | 10 +++---- src/session.rs | 4 +-- src/subscriber.rs | 6 ++-- 23 files changed, 92 insertions(+), 93 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 95867f95f..43400b861 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,19 +42,18 @@ maintenance = { status = "actively-developed" } async-std = "=1.12.0" async-trait = "0.1.66" chrono = "0.4.34" -env_logger = "0.10.0" futures = "0.3.26" json5 = "0.4.1" lazy_static = "1.4.0" libc = "0.2.139" -log = "0.4.17" rand = "0.8.5" spin = "0.9.5" # shared-memory enabled for zenoh even if zenoh-c "shared-memory" feature is disabled. This is to make "std::mem::transmute" work for `ZSLice` -zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["shared-memory", "unstable"], default-features = false } -zenoh-protocol = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["shared-memory"] } -zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } -zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["unstable"] } +zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["shared-memory", "unstable"], default-features = false } +zenoh-protocol = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["shared-memory"] } +zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } +zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["unstable"] } +tracing = "0.1" [build-dependencies] cbindgen = "0.24.3" diff --git a/src/attachment.rs b/src/attachment.rs index 5b327fe66..7988493f4 100644 --- a/src/attachment.rs +++ b/src/attachment.rs @@ -69,7 +69,7 @@ pub extern "C" fn z_attachment_iterate( if let Some(driver) = this.iteration_driver { return driver(this.data, body, context); } - log::error!("Invalid iteration_driver"); + tracing::error!("Invalid iteration_driver"); i8::MIN } diff --git a/src/closures/hello_closure.rs b/src/closures/hello_closure.rs index 4e7f76323..d24c5af81 100644 --- a/src/closures/hello_closure.rs +++ b/src/closures/hello_closure.rs @@ -54,7 +54,7 @@ pub extern "C" fn z_closure_hello_call( match closure.call { Some(call) => call(hello, closure.context), None => { - log::error!("Attempted to call an uninitialized closure!"); + tracing::error!("Attempted to call an uninitialized closure!"); } } } diff --git a/src/closures/matching_status_closure.rs b/src/closures/matching_status_closure.rs index 05792b7d8..e343ba1de 100644 --- a/src/closures/matching_status_closure.rs +++ b/src/closures/matching_status_closure.rs @@ -54,7 +54,7 @@ pub extern "C" fn zcu_closure_matching_status_call( match closure.call { Some(call) => call(sample, closure.context), None => { - log::error!("Attempted to call an uninitialized closure!"); + tracing::error!("Attempted to call an uninitialized closure!"); } } } diff --git a/src/closures/query_channel.rs b/src/closures/query_channel.rs index b7a51c9c0..b3036abee 100644 --- a/src/closures/query_channel.rs +++ b/src/closures/query_channel.rs @@ -57,7 +57,7 @@ pub extern "C" fn zc_query_fifo_new(bound: usize) -> z_owned_query_channel_t { From::from(move |query: &mut z_owned_query_t| { if let Some(query) = query.take() { if let Err(e) = tx.send(query) { - log::error!("Attempted to push onto a closed query_fifo: {}", e) + tracing::error!("Attempted to push onto a closed query_fifo: {}", e) } } }), @@ -69,7 +69,7 @@ pub extern "C" fn zc_query_fifo_new(bound: usize) -> z_owned_query_channel_t { From::from(move |query: &mut z_owned_query_t| { if let Some(query) = query.take() { if let Err(e) = tx.send(query) { - log::error!("Attempted to push onto a closed query_fifo: {}", e) + tracing::error!("Attempted to push onto a closed query_fifo: {}", e) } } }), @@ -105,7 +105,7 @@ pub extern "C" fn zc_query_non_blocking_fifo_new(bound: usize) -> z_owned_query_ From::from(move |query: &mut z_owned_query_t| { if let Some(query) = query.take() { if let Err(e) = tx.send(query) { - log::error!("Attempted to push onto a closed query_fifo: {}", e) + tracing::error!("Attempted to push onto a closed query_fifo: {}", e) } } }), @@ -117,7 +117,7 @@ pub extern "C" fn zc_query_non_blocking_fifo_new(bound: usize) -> z_owned_query_ From::from(move |query: &mut z_owned_query_t| { if let Some(query) = query.take() { if let Err(e) = tx.send(query) { - log::error!("Attempted to push onto a closed query_fifo: {}", e) + tracing::error!("Attempted to push onto a closed query_fifo: {}", e) } } }), @@ -180,7 +180,7 @@ pub extern "C" fn z_query_channel_closure_call( match closure.call { Some(call) => call(sample, closure.context), None => { - log::error!("Attempted to call an uninitialized closure!"); + tracing::error!("Attempted to call an uninitialized closure!"); true } } diff --git a/src/closures/query_closure.rs b/src/closures/query_closure.rs index 22ad4bc28..d6915f8af 100644 --- a/src/closures/query_closure.rs +++ b/src/closures/query_closure.rs @@ -48,7 +48,7 @@ pub extern "C" fn z_closure_query_null() -> z_owned_closure_query_t { pub extern "C" fn z_closure_query_call(closure: &z_owned_closure_query_t, query: &z_query_t) { match closure.call { Some(call) => call(query, closure.context), - None => log::error!("Attempted to call an uninitialized closure!"), + None => tracing::error!("Attempted to call an uninitialized closure!"), } } /// Drops the closure. Droping an uninitialized closure is a no-op. @@ -126,7 +126,7 @@ pub extern "C" fn z_closure_owned_query_call( ) { match closure.call { Some(call) => call(query, closure.context), - None => log::error!("Attempted to call an uninitialized closure!"), + None => tracing::error!("Attempted to call an uninitialized closure!"), } } /// Drops the closure. Droping an uninitialized closure is a no-op. diff --git a/src/closures/reply_closure.rs b/src/closures/reply_closure.rs index 1aa8a9b44..643822b7a 100644 --- a/src/closures/reply_closure.rs +++ b/src/closures/reply_closure.rs @@ -53,7 +53,7 @@ pub extern "C" fn z_closure_reply_call( match closure.call { Some(call) => call(sample, closure.context), None => { - log::error!("Attempted to call an uninitialized closure!"); + tracing::error!("Attempted to call an uninitialized closure!"); } } } diff --git a/src/closures/response_channel.rs b/src/closures/response_channel.rs index 0ea046d5d..5ab3a25e7 100644 --- a/src/closures/response_channel.rs +++ b/src/closures/response_channel.rs @@ -56,7 +56,7 @@ pub extern "C" fn zc_reply_fifo_new(bound: usize) -> z_owned_reply_channel_t { From::from(move |reply: &mut z_owned_reply_t| { if let Some(reply) = reply.take() { if let Err(e) = tx.send(reply) { - log::error!("Attempted to push onto a closed reply_fifo: {}", e) + tracing::error!("Attempted to push onto a closed reply_fifo: {}", e) } } }), @@ -68,7 +68,7 @@ pub extern "C" fn zc_reply_fifo_new(bound: usize) -> z_owned_reply_channel_t { From::from(move |reply: &mut z_owned_reply_t| { if let Some(reply) = reply.take() { if let Err(e) = tx.send(reply) { - log::error!("Attempted to push onto a closed reply_fifo: {}", e) + tracing::error!("Attempted to push onto a closed reply_fifo: {}", e) } } }), @@ -104,7 +104,7 @@ pub extern "C" fn zc_reply_non_blocking_fifo_new(bound: usize) -> z_owned_reply_ From::from(move |reply: &mut z_owned_reply_t| { if let Some(reply) = reply.take() { if let Err(e) = tx.send(reply) { - log::error!("Attempted to push onto a closed reply_fifo: {}", e) + tracing::error!("Attempted to push onto a closed reply_fifo: {}", e) } } }), @@ -116,7 +116,7 @@ pub extern "C" fn zc_reply_non_blocking_fifo_new(bound: usize) -> z_owned_reply_ From::from(move |reply: &mut z_owned_reply_t| { if let Some(reply) = reply.take() { if let Err(e) = tx.send(reply) { - log::error!("Attempted to push onto a closed reply_fifo: {}", e) + tracing::error!("Attempted to push onto a closed reply_fifo: {}", e) } } }), @@ -180,7 +180,7 @@ pub extern "C" fn z_reply_channel_closure_call( match closure.call { Some(call) => call(sample, closure.context), None => { - log::error!("Attempted to call an uninitialized closure!"); + tracing::error!("Attempted to call an uninitialized closure!"); true } } diff --git a/src/closures/sample_closure.rs b/src/closures/sample_closure.rs index 6f0e55707..84f32a08b 100644 --- a/src/closures/sample_closure.rs +++ b/src/closures/sample_closure.rs @@ -50,7 +50,7 @@ pub extern "C" fn z_closure_sample_null() -> z_owned_closure_sample_t { pub extern "C" fn z_closure_sample_call(closure: &z_owned_closure_sample_t, sample: &z_sample_t) { match closure.call { Some(call) => call(sample, closure.context), - None => log::error!("Attempted to call an uninitialized closure!"), + None => tracing::error!("Attempted to call an uninitialized closure!"), } } diff --git a/src/closures/zenohid_closure.rs b/src/closures/zenohid_closure.rs index 1ad7796fd..e497681c5 100644 --- a/src/closures/zenohid_closure.rs +++ b/src/closures/zenohid_closure.rs @@ -51,7 +51,7 @@ pub extern "C" fn z_closure_zid_call(closure: &z_owned_closure_zid_t, sample: &z match closure.call { Some(call) => call(sample, closure.context), None => { - log::error!("Attempted to call an uninitialized closure!"); + tracing::error!("Attempted to call an uninitialized closure!"); } } } diff --git a/src/config.rs b/src/config.rs index 80e3a38f1..b208be573 100644 --- a/src/config.rs +++ b/src/config.rs @@ -227,12 +227,12 @@ pub unsafe extern "C" fn zc_config_from_file(path: *const c_char) -> z_owned_con Ok(path) => match zenoh::config::Config::from_file(path) { Ok(c) => Some(Box::new(c)), Err(e) => { - log::error!("Couldn't read config from {}: {}", path, e); + tracing::error!("Couldn't read config from {}: {}", path, e); None } }, Err(e) => { - log::error!("Invalid path '{}': {}", path_str.to_string_lossy(), e); + tracing::error!("Invalid path '{}': {}", path_str.to_string_lossy(), e); None } })) @@ -262,7 +262,7 @@ pub unsafe extern "C" fn z_config_client( Vec::::new(), |mut acc, it| match it { Err(e) => { - log::error!("Error parsing peer address: {}", e); + tracing::error!("Error parsing peer address: {}", e); Err(()) } Ok(loc) => { diff --git a/src/get.rs b/src/get.rs index f5b3c6590..82967bbb8 100644 --- a/src/get.rs +++ b/src/get.rs @@ -216,7 +216,7 @@ pub unsafe extern "C" fn z_get( CStr::from_ptr(parameters).to_str().unwrap() }; let Some(s) = session.upgrade() else { - log::error!("{LOG_INVALID_SESSION}"); + tracing::error!("{LOG_INVALID_SESSION}"); return i8::MIN; }; let mut q = s.get(KeyExpr::try_from(keyexpr).unwrap().with_parameters(p)); @@ -244,7 +244,7 @@ pub unsafe extern "C" fn z_get( { Ok(()) => 0, Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); e.errno().get() } } diff --git a/src/keyexpr.rs b/src/keyexpr.rs index 7742b3948..2db7b5ad1 100644 --- a/src/keyexpr.rs +++ b/src/keyexpr.rs @@ -93,12 +93,12 @@ pub unsafe extern "C" fn z_keyexpr_new(name: *const c_char) -> z_owned_keyexpr_t Ok(name) => match KeyExpr::try_from(name) { Ok(v) => v.into_owned().into(), Err(e) => { - log::error!("Couldn't construct a keyexpr from {:02x?}: {}", name, e); + tracing::error!("Couldn't construct a keyexpr from {:02x?}: {}", name, e); z_owned_keyexpr_t::null() } }, Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); z_owned_keyexpr_t::null() } } @@ -118,13 +118,13 @@ pub unsafe extern "C" fn z_keyexpr_new_autocanonize(name: *const c_char) -> z_ow match KeyExpr::autocanonize(name_owned) { Ok(v) => v.into_owned().into(), Err(e) => { - log::error!("Couldn't construct a keyexpr from {:02x?}: {}", name, e); + tracing::error!("Couldn't construct a keyexpr from {:02x?}: {}", name, e); z_owned_keyexpr_t::null() } } } Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); z_owned_keyexpr_t::null() } } @@ -240,12 +240,12 @@ pub unsafe extern "C" fn z_keyexpr_is_canon(start: *const c_char, len: usize) -> Ok(name) => match keyexpr::new(name) { Ok(_) => 0, Err(e) => { - log::error!("Couldn't construct a keyexpr from `{}`: {}", name, e); + tracing::error!("Couldn't construct a keyexpr from `{}`: {}", name, e); e.errno().get() } }, Err(e) => { - log::error!("{:02x?} is not valid UTF8 {}", name, e); + tracing::error!("{:02x?} is not valid UTF8 {}", name, e); i8::MIN } } @@ -288,12 +288,12 @@ pub unsafe extern "C" fn z_keyexpr_canonize(start: *mut c_char, len: &mut usize) 0 } Err(e) => { - log::error!("Canonization error: {e}"); + tracing::error!("Canonization error: {e}"); e.errno().get() } }, Err(e) => { - log::error!("{:02x?} is not valid UTF8 {}", name, e); + tracing::error!("{:02x?} is not valid UTF8 {}", name, e); i8::MIN } } @@ -309,12 +309,12 @@ pub unsafe extern "C" fn zc_keyexpr_from_slice(name: *const c_char, len: usize) Ok(name) => match KeyExpr::try_from(name) { Ok(v) => v.into(), Err(e) => { - log::error!("Couldn't construct a keyexpr from `{}`: {}", name, e); + tracing::error!("Couldn't construct a keyexpr from `{}`: {}", name, e); z_keyexpr_t::null() } }, Err(e) => { - log::error!("{:02x?} is not valid UTF8 {}", name, e); + tracing::error!("{:02x?} is not valid UTF8 {}", name, e); z_keyexpr_t::null() } } @@ -455,7 +455,7 @@ pub extern "C" fn z_declare_keyexpr( let key_expr = match keyexpr.as_ref() { Some(ke) => ke, None => { - log::warn!("{}", UninitializedKeyExprError); + tracing::warn!("{}", UninitializedKeyExprError); return z_owned_keyexpr_t::null(); } }; @@ -463,12 +463,12 @@ pub extern "C" fn z_declare_keyexpr( Some(s) => match s.declare_keyexpr(key_expr).res_sync() { Ok(id) => id.into_owned().into(), Err(e) => { - log::debug!("{}", e); + tracing::debug!("{}", e); z_owned_keyexpr_t::null() } }, None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); z_owned_keyexpr_t::null() } } @@ -479,7 +479,7 @@ pub extern "C" fn z_declare_keyexpr( #[no_mangle] pub extern "C" fn z_undeclare_keyexpr(session: z_session_t, kexpr: &mut z_owned_keyexpr_t) -> i8 { let Some(kexpr) = kexpr.deref_mut().take() else { - log::debug!("Attempted to undeclare dropped keyexpr"); + tracing::debug!("Attempted to undeclare dropped keyexpr"); return i8::MIN; }; @@ -487,12 +487,12 @@ pub extern "C" fn z_undeclare_keyexpr(session: z_session_t, kexpr: &mut z_owned_ Some(s) => match s.undeclare(kexpr).res() { Ok(()) => 0, Err(e) => { - log::debug!("{}", e); + tracing::debug!("{}", e); e.errno().get() } }, None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); i8::MIN } } @@ -570,7 +570,7 @@ pub unsafe extern "C" fn z_keyexpr_concat( let right = match std::str::from_utf8(right) { Ok(r) => r, Err(e) => { - log::error!( + tracing::error!( "Couldn't concatenate {:02x?} to {} because it is not valid UTF8: {}", right, left, @@ -582,7 +582,7 @@ pub unsafe extern "C" fn z_keyexpr_concat( match left.concat(right) { Ok(result) => result.into(), Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); z_owned_keyexpr_t::null() } } @@ -604,7 +604,7 @@ pub extern "C" fn z_keyexpr_join(left: z_keyexpr_t, right: z_keyexpr_t) -> z_own match left.join(right.as_str()) { Ok(result) => result.into(), Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); z_owned_keyexpr_t::null() } } diff --git a/src/lib.rs b/src/lib.rs index 5019a0713..380b9ba14 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -149,7 +149,7 @@ pub(crate) const LOG_INVALID_SESSION: &str = "Invalid session"; /// this will be performed automatically by `z_open` and `z_scout`. #[no_mangle] pub extern "C" fn zc_init_logger() { - let _ = env_logger::try_init(); + zenoh_util::init_log(); } // Test should be runned with `cargo test --no-default-features` diff --git a/src/liveliness.rs b/src/liveliness.rs index 0a7c689dd..2f4d42b6a 100644 --- a/src/liveliness.rs +++ b/src/liveliness.rs @@ -96,13 +96,13 @@ pub extern "C" fn zc_liveliness_declare_token( _options: Option<&zc_owned_liveliness_declaration_options_t>, ) -> zc_owned_liveliness_token_t { let Some(session) = session.upgrade() else { - log::error!("Failed to declare liveliness token: provided session was invalid"); + tracing::error!("Failed to declare liveliness token: provided session was invalid"); return zc_liveliness_token_null(); }; match session.liveliness().declare_token(key).res() { Ok(token) => unsafe { core::mem::transmute(token) }, Err(e) => { - log::error!("Failed to declare liveliness token: {e}"); + tracing::error!("Failed to declare liveliness token: {e}"); zc_liveliness_token_null() } } @@ -117,7 +117,7 @@ pub extern "C" fn zc_liveliness_undeclare_token(token: &mut zc_owned_liveliness_ return; }; if let Err(e) = token.undeclare().res() { - log::error!("Failed to undeclare token: {e}"); + tracing::error!("Failed to undeclare token: {e}"); } } @@ -169,7 +169,7 @@ pub extern "C" fn zc_liveliness_declare_subscriber( _options: Option<&zc_owned_liveliness_declare_subscriber_options_t>, ) -> z_owned_subscriber_t { let Some(session) = session.upgrade() else { - log::error!("Failed to declare liveliness token: provided session was invalid"); + tracing::error!("Failed to declare liveliness token: provided session was invalid"); return z_owned_subscriber_t::null(); }; let callback = core::mem::replace(callback, z_owned_closure_sample_t::empty()); @@ -189,7 +189,7 @@ pub extern "C" fn zc_liveliness_declare_subscriber( { Ok(token) => z_owned_subscriber_t::new(token), Err(e) => { - log::error!("Failed to subscribe to liveliness: {e}"); + tracing::error!("Failed to subscribe to liveliness: {e}"); z_owned_subscriber_t::null() } } @@ -234,7 +234,7 @@ pub extern "C" fn zc_liveliness_get( options: Option<&zc_liveliness_get_options_t>, ) -> i8 { let Some(session) = session.upgrade() else { - log::error!("Failed to declare liveliness token: provided session was invalid"); + tracing::error!("Failed to declare liveliness token: provided session was invalid"); return i8::MIN; }; let callback = core::mem::replace(callback, z_owned_closure_reply_t::empty()); @@ -248,7 +248,7 @@ pub extern "C" fn zc_liveliness_get( match builder.res() { Ok(()) => 0, Err(e) => { - log::error!("Failed to subscribe to liveliness: {e}"); + tracing::error!("Failed to subscribe to liveliness: {e}"); e.errno().get() } } diff --git a/src/publication_cache.rs b/src/publication_cache.rs index a97354b3b..69dfc4f87 100644 --- a/src/publication_cache.rs +++ b/src/publication_cache.rs @@ -136,12 +136,12 @@ pub extern "C" fn ze_declare_publication_cache( match p.res_sync() { Ok(publication_cache) => ze_owned_publication_cache_t::new(publication_cache), Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); ze_owned_publication_cache_t::null() } } } else { - log::error!("{}", UninitializedKeyExprError); + tracing::error!("{}", UninitializedKeyExprError); ze_owned_publication_cache_t::null() } } @@ -171,7 +171,7 @@ pub extern "C" fn ze_undeclare_publication_cache( ) -> i8 { if let Some(p) = pub_cache.take() { if let Err(e) = p.close().res_sync() { - log::error!("{}", e); + tracing::error!("{}", e); return e.errno().get(); } } diff --git a/src/publisher.rs b/src/publisher.rs index f49d8cd31..c6803f8d6 100644 --- a/src/publisher.rs +++ b/src/publisher.rs @@ -151,18 +151,18 @@ pub extern "C" fn z_declare_publisher( } match p.res_sync() { Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); None } Ok(publisher) => Some(publisher), } } else { - log::error!("{}", UninitializedKeyExprError); + tracing::error!("{}", UninitializedKeyExprError); None } } None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); None } } @@ -272,7 +272,7 @@ pub unsafe extern "C" fn z_publisher_put( None => p.put(value), }; if let Err(e) = put.res_sync() { - log::error!("{}", e); + tracing::error!("{}", e); e.errno().get() } else { 0 @@ -306,7 +306,7 @@ pub unsafe extern "C" fn zc_publisher_put_owned( ) -> i8 { if let Some(p) = publisher.as_ref() { let Some(payload) = payload.and_then(|p| p.take()) else { - log::debug!("Attempted to put without a payload"); + tracing::debug!("Attempted to put without a payload"); return i8::MIN; }; let value: Value = payload.into(); @@ -315,7 +315,7 @@ pub unsafe extern "C" fn zc_publisher_put_owned( None => p.put(value), }; if let Err(e) = put.res_sync() { - log::error!("{}", e); + tracing::error!("{}", e); e.errno().get() } else { 0 @@ -353,7 +353,7 @@ pub extern "C" fn z_publisher_delete( ) -> i8 { if let Some(p) = publisher.as_ref() { if let Err(e) = p.delete().res_sync() { - log::error!("{}", e); + tracing::error!("{}", e); e.errno().get() } else { 0 @@ -449,7 +449,7 @@ pub extern "C" fn zcu_publisher_matching_listener_callback( pub extern "C" fn z_undeclare_publisher(publisher: &mut z_owned_publisher_t) -> i8 { if let Some(p) = publisher.take() { if let Err(e) = p.undeclare().res_sync() { - log::error!("{}", e); + tracing::error!("{}", e); return e.errno().get(); } } diff --git a/src/pull_subscriber.rs b/src/pull_subscriber.rs index 0eee4bc94..36a87e659 100644 --- a/src/pull_subscriber.rs +++ b/src/pull_subscriber.rs @@ -165,13 +165,13 @@ pub extern "C" fn z_declare_pull_subscriber( match res.res() { Ok(sub) => z_owned_pull_subscriber_t::new(sub), Err(e) => { - log::debug!("{}", e); + tracing::debug!("{}", e); z_owned_pull_subscriber_t::null() } } } None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); z_owned_pull_subscriber_t::null() } } @@ -183,7 +183,7 @@ pub extern "C" fn z_declare_pull_subscriber( pub extern "C" fn z_undeclare_pull_subscriber(sub: &mut z_owned_pull_subscriber_t) -> i8 { if let Some(s) = sub.as_mut().take() { if let Err(e) = s.undeclare().res_sync() { - log::warn!("{}", e); + tracing::warn!("{}", e); return e.errno().get(); } } @@ -215,7 +215,7 @@ pub extern "C" fn z_subscriber_pull(sub: z_pull_subscriber_t) -> i8 { match sub.0.as_ref() { Some(tx) => { if let Err(e) = tx.pull().res_sync() { - log::error!("{}", e); + tracing::error!("{}", e); e.errno().get() } else { 0 diff --git a/src/put.rs b/src/put.rs index b5d9f2f94..31eaae142 100644 --- a/src/put.rs +++ b/src/put.rs @@ -178,14 +178,14 @@ pub unsafe extern "C" fn z_put( } match res.res_sync() { Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); e.errno().get() } Ok(()) => 0, } } None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); i8::MIN } } @@ -226,18 +226,18 @@ pub extern "C" fn zc_put_owned( } match res.res_sync() { Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); e.errno().get() } Ok(()) => 0, } } else { - log::debug!("zc_payload_null was provided as payload for put"); + tracing::debug!("zc_payload_null was provided as payload for put"); i8::MIN } } None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); i8::MIN } } @@ -286,14 +286,14 @@ pub extern "C" fn z_delete( } match res.res_sync() { Err(e) => { - log::error!("{}", e); + tracing::error!("{}", e); e.errno().get() } Ok(()) => 0, } } None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); i8::MIN } } diff --git a/src/queryable.rs b/src/queryable.rs index 1906dc735..a82fe02e8 100644 --- a/src/queryable.rs +++ b/src/queryable.rs @@ -223,7 +223,7 @@ pub extern "C" fn z_declare_queryable( let session = match session.upgrade() { Some(s) => s, None => { - log::error!("{}", LOG_INVALID_SESSION); + tracing::error!("{}", LOG_INVALID_SESSION); return None.into(); } }; @@ -234,7 +234,7 @@ pub extern "C" fn z_declare_queryable( builder .callback(move |query| z_closure_query_call(&closure, &z_query_t::from(&query))) .res_sync() - .map_err(|e| log::error!("{}", e)) + .map_err(|e| tracing::error!("{}", e)) .ok() .into() } @@ -248,7 +248,7 @@ pub extern "C" fn z_declare_queryable( pub extern "C" fn z_undeclare_queryable(qable: &mut z_owned_queryable_t) -> i8 { if let Some(qable) = qable.take() { if let Err(e) = qable.undeclare().res_sync() { - log::error!("{}", e); + tracing::error!("{}", e); return e.errno().get(); } } @@ -285,7 +285,7 @@ pub unsafe extern "C" fn z_query_reply( options: Option<&z_query_reply_options_t>, ) -> i8 { let Some(query) = query.as_ref() else { - log::error!("Called `z_query_reply` with invalidated `query`"); + tracing::error!("Called `z_query_reply` with invalidated `query`"); return i8::MIN; }; if let Some(key) = &*key { @@ -306,7 +306,7 @@ pub unsafe extern "C" fn z_query_reply( }; } if let Err(e) = query.reply(Ok(s)).res_sync() { - log::error!("{}", e); + tracing::error!("{}", e); return e.errno().get(); } 0 diff --git a/src/querying_subscriber.rs b/src/querying_subscriber.rs index cdec44f0f..118f9a4e6 100644 --- a/src/querying_subscriber.rs +++ b/src/querying_subscriber.rs @@ -198,13 +198,13 @@ pub unsafe extern "C" fn ze_declare_querying_subscriber( { Ok(sub) => ze_owned_querying_subscriber_t::new(sub, session), Err(e) => { - log::debug!("{}", e); + tracing::debug!("{}", e); ze_owned_querying_subscriber_t::null() } } } None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); ze_owned_querying_subscriber_t::null() } } @@ -241,12 +241,12 @@ pub unsafe extern "C" fn ze_querying_subscriber_get( }) .res() { - log::debug!("{}", e); + tracing::debug!("{}", e); return -1; } } None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); return -1; } } @@ -260,7 +260,7 @@ pub unsafe extern "C" fn ze_querying_subscriber_get( pub extern "C" fn ze_undeclare_querying_subscriber(sub: &mut ze_owned_querying_subscriber_t) -> i8 { if let Some(s) = sub.take() { if let Err(e) = s.fetching_subscriber.close().res_sync() { - log::warn!("{}", e); + tracing::warn!("{}", e); return e.errno().get(); } } diff --git a/src/session.rs b/src/session.rs index 2caab85ea..52b9e5ccf 100644 --- a/src/session.rs +++ b/src/session.rs @@ -105,14 +105,14 @@ pub extern "C" fn z_open(config: &mut z_owned_config_t) -> z_owned_session_t { let config = match config.as_mut().take() { Some(c) => c, None => { - log::error!("Config not provided"); + tracing::error!("Config not provided"); return z_owned_session_t::null(); } }; match zenoh::open(*config).res() { Ok(s) => z_owned_session_t::new(Arc::new(s)), Err(e) => { - log::error!("Error opening session: {}", e); + tracing::error!("Error opening session: {}", e); z_owned_session_t::null() } } diff --git a/src/subscriber.rs b/src/subscriber.rs index b9488960a..7a5f5a3e1 100644 --- a/src/subscriber.rs +++ b/src/subscriber.rs @@ -194,13 +194,13 @@ pub extern "C" fn z_declare_subscriber( match res.res() { Ok(sub) => z_owned_subscriber_t::new(sub), Err(e) => { - log::debug!("{}", e); + tracing::debug!("{}", e); z_owned_subscriber_t::null() } } } None => { - log::debug!("{}", LOG_INVALID_SESSION); + tracing::debug!("{}", LOG_INVALID_SESSION); z_owned_subscriber_t::null() } } @@ -223,7 +223,7 @@ pub extern "C" fn z_subscriber_keyexpr(subscriber: z_subscriber_t) -> z_owned_ke pub extern "C" fn z_undeclare_subscriber(sub: &mut z_owned_subscriber_t) -> i8 { if let Some(s) = sub.take() { if let Err(e) = s.undeclare().res_sync() { - log::warn!("{}", e); + tracing::warn!("{}", e); return e.errno().get(); } } From eb5ae65ffde1b97cfd97f9b68b25100e72868bd2 Mon Sep 17 00:00:00 2001 From: gabrik Date: Wed, 3 Apr 2024 15:08:46 +0200 Subject: [PATCH 2/4] chore: adding Cargo.lock Signed-off-by: gabrik --- Cargo.lock | 313 ++++++++++++++++++++++++++--------------------------- 1 file changed, 156 insertions(+), 157 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 959b85749..34a711cc0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,54 +70,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anstream" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" - -[[package]] -name = "anstyle-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - [[package]] name = "anyhow" version = "1.0.75" @@ -463,12 +415,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - [[package]] name = "concurrent-queue" version = "2.2.0" @@ -604,42 +550,6 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" -[[package]] -name = "env_filter" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c012a26a7f605efc424dd53697843a72be7dc86ad2d01f7814337794a12231d" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -1076,17 +986,6 @@ dependencies = [ "serde", ] -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.32", - "windows-sys 0.48.0", -] - [[package]] name = "itoa" version = "1.0.9" @@ -1211,6 +1110,15 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "memchr" version = "2.6.3" @@ -1285,6 +1193,16 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint-dig" version = "0.8.4" @@ -1385,6 +1303,12 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parking" version = "2.1.0" @@ -1684,8 +1608,17 @@ checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.3.8", + "regex-syntax 0.7.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -1696,9 +1629,15 @@ checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.7.5", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.7.5" @@ -2092,6 +2031,15 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shared_memory" version = "0.12.4" @@ -2302,6 +2250,16 @@ dependencies = [ "syn 2.0.33", ] +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2442,6 +2400,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", ] [[package]] @@ -2572,12 +2573,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - [[package]] name = "uuid" version = "1.4.1" @@ -2611,6 +2606,12 @@ dependencies = [ "unzip-n", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "value-bag" version = "1.4.1" @@ -2953,19 +2954,17 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "base64", "const_format", - "env_logger 0.11.2", "event-listener 4.0.0", "flume", "form_urlencoded", "futures", "git-version", "lazy_static", - "log", "ordered-float", "paste", "petgraph", @@ -2978,6 +2977,7 @@ dependencies = [ "stop-token", "tokio", "tokio-util", + "tracing", "uhlc", "uuid", "vec_map", @@ -3004,7 +3004,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "zenoh-collections", ] @@ -3017,16 +3017,15 @@ dependencies = [ "async-trait", "cbindgen", "chrono", - "env_logger 0.10.2", "fs2", "futures", "json5", "lazy_static", "libc", - "log", "rand", "serde_yaml", "spin 0.9.8", + "tracing", "zenoh", "zenoh-ext", "zenoh-protocol", @@ -3036,10 +3035,10 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ - "log", "serde", + "tracing", "uhlc", "zenoh-buffers", "zenoh-protocol", @@ -3049,21 +3048,21 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" [[package]] name = "zenoh-config" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "flume", "json5", - "log", "num_cpus", "secrecy", "serde", "serde_json", "serde_yaml", + "tracing", "validated_struct", "zenoh-core", "zenoh-protocol", @@ -3074,7 +3073,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-global-executor", "lazy_static", @@ -3086,7 +3085,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "aes", "hmac", @@ -3099,15 +3098,14 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "bincode", - "env_logger 0.11.2", "flume", "futures", - "log", "serde", "tokio", + "tracing", "zenoh", "zenoh-core", "zenoh-macros", @@ -3121,7 +3119,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -3135,7 +3133,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "zenoh-config", @@ -3153,17 +3151,17 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "flume", "futures", - "log", "rustls 0.22.2", "rustls-webpki 0.102.2", "serde", "tokio", "tokio-util", + "tracing", "zenoh-buffers", "zenoh-codec", "zenoh-core", @@ -3176,12 +3174,11 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "base64", "futures", - "log", "quinn", "rustls 0.21.7", "rustls-native-certs 0.7.0", @@ -3191,6 +3188,7 @@ dependencies = [ "tokio", "tokio-rustls 0.24.1", "tokio-util", + "tracing", "zenoh-config", "zenoh-core", "zenoh-link-commons", @@ -3204,12 +3202,12 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", - "log", "tokio", "tokio-util", + "tracing", "zenoh-core", "zenoh-link-commons", "zenoh-protocol", @@ -3222,12 +3220,11 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "base64", "futures", - "log", "rustls 0.22.2", "rustls-pemfile 2.0.0", "rustls-pki-types", @@ -3236,6 +3233,7 @@ dependencies = [ "tokio", "tokio-rustls 0.25.0", "tokio-util", + "tracing", "webpki-roots", "zenoh-config", "zenoh-core", @@ -3250,13 +3248,13 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", - "log", "socket2 0.5.6", "tokio", "tokio-util", + "tracing", "zenoh-buffers", "zenoh-collections", "zenoh-core", @@ -3271,14 +3269,14 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "futures", - "log", "nix 0.27.1", "tokio", "tokio-util", + "tracing", "uuid", "zenoh-core", "zenoh-link-commons", @@ -3291,14 +3289,14 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "futures-util", - "log", "tokio", "tokio-tungstenite", "tokio-util", + "tracing", "url", "zenoh-core", "zenoh-link-commons", @@ -3312,7 +3310,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "proc-macro2", "quote", @@ -3323,13 +3321,13 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "const_format", "libloading", - "log", "serde", "serde_json", + "tracing", "zenoh-keyexpr", "zenoh-macros", "zenoh-result", @@ -3339,7 +3337,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "const_format", "rand", @@ -3353,7 +3351,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "anyhow", ] @@ -3361,7 +3359,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "futures", "lazy_static", @@ -3373,11 +3371,11 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ - "log", "serde", "shared_memory", + "tracing", "zenoh-buffers", "zenoh-result", ] @@ -3385,7 +3383,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "event-listener 4.0.0", "futures", @@ -3399,12 +3397,12 @@ dependencies = [ [[package]] name = "zenoh-task" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "futures", - "log", "tokio", "tokio-util", + "tracing", "zenoh-core", "zenoh-runtime", ] @@ -3412,11 +3410,10 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "flume", - "log", "lz4_flex", "paste", "rand", @@ -3426,6 +3423,7 @@ dependencies = [ "sha3", "tokio", "tokio-util", + "tracing", "zenoh-buffers", "zenoh-codec", "zenoh-collections", @@ -3445,7 +3443,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-std", "async-trait", @@ -3455,10 +3453,11 @@ dependencies = [ "lazy_static", "libc", "libloading", - "log", "pnet_datalink", "shellexpand", "tokio", + "tracing", + "tracing-subscriber", "winapi", "zenoh-core", "zenoh-result", From f5afad2586d101de449bf6f965238531f637dab2 Mon Sep 17 00:00:00 2001 From: gabrik Date: Wed, 3 Apr 2024 15:25:26 +0200 Subject: [PATCH 3/4] chore: updated Cargo.toml.in Signed-off-by: gabrik --- Cargo.toml.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.toml.in b/Cargo.toml.in index f434df3a1..3f6973a6c 100644 --- a/Cargo.toml.in +++ b/Cargo.toml.in @@ -42,19 +42,18 @@ maintenance = { status = "actively-developed" } async-std = "=1.12.0" async-trait = "0.1.66" chrono = "0.4.34" -env_logger = "0.10.0" futures = "0.3.26" json5 = "0.4.1" lazy_static = "1.4.0" libc = "0.2.139" -log = "0.4.17" rand = "0.8.5" spin = "0.9.5" # shared-memory enabled for zenoh even if zenoh-c "shared-memory" feature is disabled. This is to make "std::mem::transmute" work for `ZSLice` -zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["shared-memory", "unstable"], default-features = false } -zenoh-protocol = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["shared-memory"] } -zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } -zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["unstable"] } +zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["shared-memory", "unstable"], default-features = false } +zenoh-protocol = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["shared-memory"] } +zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } +zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["unstable"] } +tracing = "0.1" [build-dependencies] cbindgen = "0.24.3" From 9de3a87ce8a5e18b9edf96142b782249e122201c Mon Sep 17 00:00:00 2001 From: gabrik Date: Thu, 11 Apr 2024 18:31:38 +0200 Subject: [PATCH 4/4] feat(tracing): using zenoh main branch Signed-off-by: gabrik --- Cargo.lock | 54 +++++++++++++++++++++++++-------------------------- Cargo.toml | 8 ++++---- Cargo.toml.in | 8 ++++---- src/lib.rs | 2 +- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 34a711cc0..4a239ba25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2954,7 +2954,7 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "base64", @@ -3004,7 +3004,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "zenoh-collections", ] @@ -3035,7 +3035,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "serde", "tracing", @@ -3048,12 +3048,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" [[package]] name = "zenoh-config" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "flume", "json5", @@ -3073,7 +3073,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-global-executor", "lazy_static", @@ -3085,7 +3085,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "aes", "hmac", @@ -3098,7 +3098,7 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "bincode", "flume", @@ -3119,7 +3119,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -3133,7 +3133,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "zenoh-config", @@ -3151,7 +3151,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "flume", @@ -3174,7 +3174,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "base64", @@ -3202,7 +3202,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "tokio", @@ -3220,7 +3220,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "base64", @@ -3248,7 +3248,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "socket2 0.5.6", @@ -3269,7 +3269,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "futures", @@ -3289,7 +3289,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "futures-util", @@ -3310,7 +3310,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "proc-macro2", "quote", @@ -3321,7 +3321,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "const_format", "libloading", @@ -3337,7 +3337,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "const_format", "rand", @@ -3351,7 +3351,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "anyhow", ] @@ -3359,7 +3359,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "futures", "lazy_static", @@ -3371,7 +3371,7 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "serde", "shared_memory", @@ -3383,7 +3383,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "event-listener 4.0.0", "futures", @@ -3397,7 +3397,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "futures", "tokio", @@ -3410,7 +3410,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-trait", "flume", @@ -3443,7 +3443,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#56a44457aac962ba23fbca2f2f9daa663885c4e6" dependencies = [ "async-std", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 43400b861..a4e0362b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,10 +49,10 @@ libc = "0.2.139" rand = "0.8.5" spin = "0.9.5" # shared-memory enabled for zenoh even if zenoh-c "shared-memory" feature is disabled. This is to make "std::mem::transmute" work for `ZSLice` -zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["shared-memory", "unstable"], default-features = false } -zenoh-protocol = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["shared-memory"] } -zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } -zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["unstable"] } +zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["shared-memory", "unstable"], default-features = false } +zenoh-protocol = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["shared-memory"] } +zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } +zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["unstable"] } tracing = "0.1" [build-dependencies] diff --git a/Cargo.toml.in b/Cargo.toml.in index 3f6973a6c..34984b875 100644 --- a/Cargo.toml.in +++ b/Cargo.toml.in @@ -49,10 +49,10 @@ libc = "0.2.139" rand = "0.8.5" spin = "0.9.5" # shared-memory enabled for zenoh even if zenoh-c "shared-memory" feature is disabled. This is to make "std::mem::transmute" work for `ZSLice` -zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["shared-memory", "unstable"], default-features = false } -zenoh-protocol = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["shared-memory"] } -zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } -zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["unstable"] } +zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["shared-memory", "unstable"], default-features = false } +zenoh-protocol = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["shared-memory"] } +zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } +zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["unstable"] } tracing = "0.1" [build-dependencies] diff --git a/src/lib.rs b/src/lib.rs index 380b9ba14..1d9f01dab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -149,7 +149,7 @@ pub(crate) const LOG_INVALID_SESSION: &str = "Invalid session"; /// this will be performed automatically by `z_open` and `z_scout`. #[no_mangle] pub extern "C" fn zc_init_logger() { - zenoh_util::init_log(); + zenoh_util::init_log_from_env(); } // Test should be runned with `cargo test --no-default-features`