Skip to content

Commit

Permalink
feat(tracing): using zenoh-util function for log initialization
Browse files Browse the repository at this point in the history
Signed-off-by: gabrik <[email protected]>
  • Loading branch information
gabrik committed Apr 3, 2024
1 parent 1516153 commit 6c68beb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand All @@ -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" }
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c68beb

Please sign in to comment.