From 6c68beb501d6716c279818870b34294a18f8f138 Mon Sep 17 00:00:00 2001 From: gabrik Date: Wed, 3 Apr 2024 12:38:20 +0200 Subject: [PATCH] feat(tracing): using zenoh-util function for log initialization Signed-off-by: gabrik --- Cargo.toml | 2 +- src/lib.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 642d65fe..56610c50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,6 @@ default = ["zenoh/default"] maintenance = { status = "actively-developed" } [dependencies] -env_logger = "0.10.0" flume = "0.11.0" json5 = "0.4.1" pyo3 = { version = "0.18.1", features = ["extension-module", "abi3-py37"] } @@ -50,3 +49,4 @@ validated_struct = "2.1.0" zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["unstable"], default-features = false } zenoh-buffers = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } zenoh-core = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } +zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } diff --git a/src/lib.rs b/src/lib.rs index fb4cc3ff..ad10fa2f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -107,11 +107,12 @@ fn zenoh(_py: Python, m: &PyModule) -> PyResult<()> { /// /// $ RUST_LOG=debug python /// -/// More details on the RUST_LOG configuration on https://docs.rs/env_logger/latest/env_logger +/// More details on the RUST_LOG configuration on +/// https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#method.try_from_env /// #[pyfunction] fn init_logger() { - let _ = env_logger::try_init(); + zenoh_util::init_log(); } pub(crate) use value::PyAnyToValue;