From d9bb711822072662b19ea95a0b9ed1c83d4c8155 Mon Sep 17 00:00:00 2001 From: gabrik Date: Wed, 3 Apr 2024 14:56:56 +0200 Subject: [PATCH 1/2] feat(tracing): use tracing and zenoh-util init log Signed-off-by: gabrik --- Cargo.lock | 297 ++++++++++++++++++++++++++++---------------------- Cargo.toml | 15 ++- v1/Cargo.toml | 3 +- v1/src/lib.rs | 11 +- v2/Cargo.toml | 3 +- v2/src/lib.rs | 45 ++++---- 6 files changed, 204 insertions(+), 170 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7644189..25c9273 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,54 +124,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" @@ -536,12 +488,6 @@ dependencies = [ "inout", ] -[[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" @@ -849,29 +795,6 @@ dependencies = [ "cfg-if", ] -[[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.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" @@ -1681,6 +1604,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" @@ -1760,6 +1692,16 @@ dependencies = [ "version_check", ] +[[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" @@ -1869,6 +1811,12 @@ dependencies = [ "num-traits", ] +[[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" @@ -2287,8 +2235,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]] @@ -2299,9 +2256,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" @@ -2823,6 +2786,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 = "shellexpand" version = "3.1.0" @@ -3124,6 +3096,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 = "time" version = "0.2.27" @@ -3300,6 +3282,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]] @@ -3456,12 +3481,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" @@ -3495,6 +3514,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" @@ -3839,19 +3864,17 @@ dependencies = [ [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "base64 0.21.4", "const_format", - "env_logger", "event-listener 4.0.0", "flume", "form_urlencoded", "futures", "git-version", "lazy_static", - "log", "ordered-float 4.1.1", "paste", "petgraph", @@ -3864,6 +3887,7 @@ dependencies = [ "stop-token", "tokio", "tokio-util", + "tracing", "uhlc", "uuid", "vec_map", @@ -3881,6 +3905,7 @@ dependencies = [ "zenoh-result", "zenoh-runtime", "zenoh-sync", + "zenoh-task", "zenoh-transport", "zenoh-util", ] @@ -3892,15 +3917,14 @@ dependencies = [ "async-std", "async-trait", "base64 0.21.4", - "env_logger", "git-version", "humantime", "influxdb", "lazy_static", - "log", "rustc_version 0.4.0", "serde", "serde_json", + "tracing", "uuid", "zenoh", "zenoh-collections", @@ -3918,19 +3942,18 @@ dependencies = [ "async-trait", "base64 0.21.4", "chrono", - "env_logger", "futures", "git-version", "influxdb2", "influxdb2-derive", "influxdb2-structmap", "lazy_static", - "log", "num-traits", "rand 0.8.5", "rustc_version 0.4.0", "serde", "serde_json", + "tracing", "uuid", "zenoh", "zenoh-collections", @@ -3943,7 +3966,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "zenoh-collections", ] @@ -3951,10 +3974,10 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ - "log", "serde", + "tracing", "uhlc", "zenoh-buffers", "zenoh-protocol", @@ -3963,21 +3986,21 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +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#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +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", @@ -3988,7 +4011,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-global-executor", "lazy_static", @@ -4000,7 +4023,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "aes 0.8.3", "hmac 0.12.1", @@ -4013,7 +4036,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -4027,7 +4050,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "zenoh-config", @@ -4045,17 +4068,17 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +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", @@ -4068,12 +4091,11 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "base64 0.21.4", "futures", - "log", "quinn", "rustls 0.21.7", "rustls-native-certs 0.7.0", @@ -4083,6 +4105,7 @@ dependencies = [ "tokio", "tokio-rustls 0.24.1", "tokio-util", + "tracing", "zenoh-config", "zenoh-core", "zenoh-link-commons", @@ -4096,12 +4119,12 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +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", @@ -4114,12 +4137,11 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "base64 0.21.4", "futures", - "log", "rustls 0.22.2", "rustls-pemfile 2.0.0", "rustls-pki-types", @@ -4128,6 +4150,7 @@ dependencies = [ "tokio", "tokio-rustls 0.25.0", "tokio-util", + "tracing", "webpki-roots 0.26.0", "zenoh-config", "zenoh-core", @@ -4142,13 +4165,13 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +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", @@ -4163,14 +4186,14 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "futures", - "log", "nix", "tokio", "tokio-util", + "tracing", "uuid", "zenoh-core", "zenoh-link-commons", @@ -4183,14 +4206,14 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +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", @@ -4204,7 +4227,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "proc-macro2", "quote", @@ -4215,13 +4238,13 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +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", @@ -4231,7 +4254,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "const_format", "rand 0.8.5", @@ -4245,7 +4268,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "anyhow", ] @@ -4253,8 +4276,9 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ + "futures", "lazy_static", "tokio", "zenoh-collections", @@ -4264,7 +4288,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "event-listener 4.0.0", "futures", @@ -4275,14 +4299,26 @@ dependencies = [ "zenoh-runtime", ] +[[package]] +name = "zenoh-task" +version = "0.11.0-dev" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" +dependencies = [ + "futures", + "tokio", + "tokio-util", + "tracing", + "zenoh-core", + "zenoh-runtime", +] + [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-trait", "flume", - "log", "lz4_flex", "paste", "rand 0.8.5", @@ -4292,6 +4328,7 @@ dependencies = [ "sha3", "tokio", "tokio-util", + "tracing", "zenoh-buffers", "zenoh-codec", "zenoh-collections", @@ -4303,13 +4340,14 @@ dependencies = [ "zenoh-result", "zenoh-runtime", "zenoh-sync", + "zenoh-task", "zenoh-util", ] [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-std", "async-trait", @@ -4319,10 +4357,11 @@ dependencies = [ "lazy_static", "libc", "libloading", - "log", "pnet_datalink", "shellexpand", "tokio", + "tracing", + "tracing-subscriber", "winapi", "zenoh-core", "zenoh-result", @@ -4331,7 +4370,7 @@ dependencies = [ [[package]] name = "zenoh_backend_traits" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#e04c8613d3c33472edcbde6fde5bd4beeb24f2bf" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=feat/tracing#050290c15ff42cc76af446b17f158500a09b37bb" dependencies = [ "async-std", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index d1568e1..539c87b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,17 +38,16 @@ description = "Backend for Zenoh using InfluxDB" async-std = "1.12.0" async-trait = "0.1.66" base64 = "0.21.0" -env_logger = "0.11.0" git-version = "0.3.5" lazy_static = "1.4.0" -log = "0.4.17" serde = { version = "1.0.154", features = ["derive"] } serde_json = "1.0.94" +tracing = "0.1" uuid = { version = "1.3.0", features = ["v4"] } -zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["unstable"] } -zenoh_backend_traits = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } -zenoh-plugin-trait = { version = "0.11.0-dev", git = "htttps://github.com/eclipse-zenoh/zenoh", branch = "main" } -zenoh-collections = { 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 = "main" } +zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["unstable"] } +zenoh_backend_traits = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } +zenoh-plugin-trait = { version = "0.11.0-dev", git = "htttps://github.com/eclipse-zenoh/zenoh", branch = "feat/tracing" } +zenoh-collections = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } +zenoh-core = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } +zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } diff --git a/v1/Cargo.toml b/v1/Cargo.toml index bd3ee33..cd55508 100644 --- a/v1/Cargo.toml +++ b/v1/Cargo.toml @@ -23,14 +23,13 @@ stats = ["zenoh/stats"] async-std = { workspace = true } async-trait = { workspace = true } base64 = { workspace = true } -env_logger = { workspace = true } git-version = { workspace = true } humantime = "2.1.0" influxdb = { version = "0.7.1", default-features = false, features = ["derive", "use-serde", "h1-client-rustls"] } lazy_static = { workspace = true } -log = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } +tracing = { workspace = true } uuid = { workspace = true } zenoh = { workspace = true } zenoh_backend_traits = { workspace = true } diff --git a/v1/src/lib.rs b/v1/src/lib.rs index 51df3b0..df2cf6e 100644 --- a/v1/src/lib.rs +++ b/v1/src/lib.rs @@ -18,12 +18,12 @@ use base64::{engine::general_purpose::STANDARD as b64_std_engine, Engine}; use influxdb::{ Client, ReadQuery as InfluxRQuery, Timestamp as InfluxTimestamp, WriteQuery as InfluxWQuery, }; -use log::{debug, error, warn}; use serde::Deserialize; use std::convert::{TryFrom, TryInto}; use std::str::FromStr; use std::sync::Arc; use std::time::{Duration, Instant}; +use tracing::{debug, error, warn}; use uuid::Uuid; use zenoh::buffers::{buffer::SplitBuffer, ZBuf}; use zenoh::prelude::*; @@ -70,7 +70,7 @@ fn get_private_conf<'a>( PrivacyGetResult::NotFound => Ok(None), PrivacyGetResult::Private(serde_json::Value::String(v)) => Ok(Some(v)), PrivacyGetResult::Public(serde_json::Value::String(v)) => { - log::warn!( + tracing::warn!( r#"Value "{}" is given for `{}` publicly (i.e. is visible by anyone who can fetch the router configuration). You may want to replace `{}: "{}"` with `private: {{{}: "{}"}}`"#, v, credit, @@ -85,7 +85,7 @@ fn get_private_conf<'a>( public: serde_json::Value::String(public), private: serde_json::Value::String(private), } => { - log::warn!( + tracing::warn!( r#"Value "{}" is given for `{}` publicly, but a private value also exists. The private value will be used, but the public value, which is {} the same as the private one, will still be visible in configurations."#, public, credit, @@ -111,9 +111,8 @@ impl Plugin for InfluxDbBackend { const PLUGIN_LONG_VERSION: &'static str = plugin_long_version!(); fn start(_name: &str, config: &Self::StartArgs) -> ZResult { - // For some reasons env_logger is sometime not active in a loaded library. - // Try to activate it here, ignoring failures. - let _ = env_logger::try_init(); + zenoh_util::init_log(); + debug!("InfluxDB backend {}", Self::PLUGIN_VERSION); let mut config = config.clone(); diff --git a/v2/Cargo.toml b/v2/Cargo.toml index 5937f24..c00a184 100644 --- a/v2/Cargo.toml +++ b/v2/Cargo.toml @@ -24,7 +24,6 @@ async-std = { workspace = true } async-trait = { workspace = true } base64 = { workspace = true } chrono = { version = "0.4.31", features = ["serde"] } -env_logger = { workspace = true } futures = "0.3.28" git-version = { workspace = true } influxdb2 = { version = "0.4.5", features = [ @@ -33,11 +32,11 @@ influxdb2 = { version = "0.4.5", features = [ influxdb2-derive = "0.1.1" influxdb2-structmap = "0.2" lazy_static = { workspace = true } -log = { workspace = true } num-traits = "0.2" rand = "0.8.5" serde = { workspace = true } serde_json = { workspace = true } +tracing = { workspace = true } uuid = { workspace = true } zenoh = { workspace = true } zenoh_backend_traits = { workspace = true } diff --git a/v2/src/lib.rs b/v2/src/lib.rs index ef0beac..bc47253 100644 --- a/v2/src/lib.rs +++ b/v2/src/lib.rs @@ -71,7 +71,7 @@ fn get_private_conf<'a>(config: Config<'a>, credit: &str) -> ZResult Ok(None), PrivacyGetResult::Private(serde_json::Value::String(v)) => Ok(Some(v)), PrivacyGetResult::Public(serde_json::Value::String(v)) => { - log::warn!( + tracing::warn!( r#"Value "{}" is given for `{}` publicly (i.e. is visible by anyone who can fetch the router configuration). You may want to replace `{}: "{}"` with `private: {{{}: "{}"}}`"#, v, @@ -87,7 +87,7 @@ fn get_private_conf<'a>(config: Config<'a>, credit: &str) -> ZResult { - log::warn!( + tracing::warn!( r#"Value "{}" is given for `{}` publicly, but a private value also exists. The private value will be used, but the public value, which is {} the same as the private one, will still be visible in configurations."#, @@ -117,7 +117,7 @@ fn extract_credentials(config: Config) -> ZResult> { token: token.clone(), })), _ => { - log::error!("Couldn't get token and org"); + tracing::error!("Couldn't get token and org"); bail!( "Properties `{}` and `{}` must exist", PROP_BACKEND_ORG_ID, @@ -139,10 +139,9 @@ impl Plugin for InfluxDbBackend { const PLUGIN_LONG_VERSION: &'static str = plugin_long_version!(); fn start(_name: &str, config: &Self::StartArgs) -> ZResult { - // For some reasons env_logger is sometime not active in a loaded library. - // Try to activate it here, ignoring failures. - let _ = env_logger::try_init(); - log::debug!("InfluxDBv2 backend {}", Self::PLUGIN_VERSION); + zenoh_util::init_log(); + + tracing::debug!("InfluxDBv2 backend {}", Self::PLUGIN_VERSION); let mut config = config.clone(); config @@ -400,7 +399,7 @@ impl InfluxDbStorage { query_result = result; } Err(e) => { - log::error!( + tracing::error!( "Couldn't get data from InfluxDBv2 database {} with error: {} ", db, e @@ -464,7 +463,7 @@ impl Storage for InfluxDbStorage { if let Some(del_time) = self.get_deletion_timestamp(measurement.as_str()).await? { // ignore sample if oldest than the deletion if timestamp < del_time { - log::debug!( + tracing::debug!( "Received a value for {:?} with timestamp older than its deletion in InfluxDBv2 database; Ignore it", measurement ); @@ -526,7 +525,7 @@ impl Storage for InfluxDbStorage { .expect("Couldn't convert uhlc timestamp to naivedatetime"); let predicate = None; //can be specified with tag or field values - log::debug!( + tracing::debug!( "Delete {:?} with Influx query in InfluxDBv2 storage", measurement ); @@ -555,7 +554,7 @@ impl Storage for InfluxDbStorage { .timestamp(influx_time) //converted timestamp to i64 .build()?]; - log::debug!( + tracing::debug!( "Mark measurement {} as deleted at time {} in InfluxDBv2 storage", measurement.clone(), stop_timestamp @@ -626,7 +625,7 @@ impl Storage for InfluxDbStorage { } } - log::debug!( + tracing::debug!( "Get {:?} with Influx query:{} in InfluxDBv2 storage", key, qs @@ -642,7 +641,7 @@ impl Storage for InfluxDbStorage { query_result = result; } Err(e) => { - log::error!( + tracing::error!( "Couldn't get data from database {} in InfluxDBv2 storage with error: {} ", db, e @@ -676,7 +675,7 @@ impl Storage for InfluxDbStorage { match b64_std_engine.decode(zpoint.value) { Ok(v) => ZBuf::from(v), Err(e) => { - log::warn!( + tracing::warn!( r#"Failed to decode zenoh base64 Value from Influx point with timestamp="{}": {}"#, zpoint.timestamp, e @@ -691,7 +690,7 @@ impl Storage for InfluxDbStorage { let timestamp = match Timestamp::from_str(&zpoint.timestamp) { Ok(t) => t, Err(e) => { - log::warn!( + tracing::warn!( r#"Failed to decode zenoh Timestamp from Influx point with timestamp="{}": {:?}"#, zpoint.timestamp, e @@ -707,7 +706,7 @@ impl Storage for InfluxDbStorage { //putting a stub here to be implemented later async fn get_all_entries(&self) -> ZResult, Timestamp)>> { - log::warn!("called get_all_entries in InfluxDBv2 storage"); + tracing::warn!("called get_all_entries in InfluxDBv2 storage"); let mut result: Vec<(Option, Timestamp)> = Vec::new(); let curr_time = zenoh::time::new_reception_timestamp(); result.push((None, curr_time)); @@ -725,11 +724,11 @@ fn get_db_name(config: StorageConfig) -> ZResult { impl Drop for InfluxDbStorage { fn drop(&mut self) { - log::debug!("Closing InfluxDBv2 storage"); + tracing::debug!("Closing InfluxDBv2 storage"); let db = match self.config.volume_cfg.get(PROP_STORAGE_DB) { Some(serde_json::Value::String(s)) => s.to_string(), _ => { - log::error!("no db was found"); + tracing::error!("no db was found"); return; } }; @@ -737,22 +736,22 @@ impl Drop for InfluxDbStorage { match self.on_closure { OnClosure::DropDb => { task::block_on(async move { - log::debug!("Close InfluxDBv2 storage, dropping database {}", db); + tracing::debug!("Close InfluxDBv2 storage, dropping database {}", db); if let Err(e) = self.admin_client.delete_bucket(&db).await { - log::error!("Failed to drop InfluxDbv2 database '{}' : {}", db, e) + tracing::error!("Failed to drop InfluxDbv2 database '{}' : {}", db, e) } }); } OnClosure::DropSeries => { task::block_on(async move { - log::debug!( + tracing::debug!( "Close InfluxDBv2 storage, dropping all series from database {}", db ); let start = NaiveDateTime::MIN; let stop = NaiveDateTime::MAX; if let Err(e) = self.client.delete(&db, start, stop, None).await { - log::error!( + tracing::error!( "Failed to drop all series from InfluxDbv2 database '{}' : {}", db, e @@ -761,7 +760,7 @@ impl Drop for InfluxDbStorage { }); } OnClosure::DoNothing => { - log::debug!("Close InfluxDBv2 storage, keeping database {} as it is", db); + tracing::debug!("Close InfluxDBv2 storage, keeping database {} as it is", db); } } } From a414448971c6be4b289d91ef74fa09a96525b7a0 Mon Sep 17 00:00:00 2001 From: gabrik Date: Fri, 12 Apr 2024 08:14:43 +0200 Subject: [PATCH 2/2] feat(tracing): using zenoh main branch Signed-off-by: gabrik --- Cargo.lock | 73 ++++++++++++++++++++++----------------------------- Cargo.toml | 12 ++++----- v1/src/lib.rs | 2 +- v2/src/lib.rs | 2 +- 4 files changed, 39 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25c9273..b72f692 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -803,23 +803,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -1083,9 +1072,9 @@ checksum = "558b88954871f5e5b2af0e62e2e176c8bde7a6c2c4ed41b13d138d96da2e2cbd" [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -3864,7 +3853,7 @@ dependencies = [ [[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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "base64 0.21.4", @@ -3966,7 +3955,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "zenoh-collections", ] @@ -3974,7 +3963,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "serde", "tracing", @@ -3986,12 +3975,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#580f0b6142338c73d17da28b17986b0094272c6e" [[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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "flume", "json5", @@ -4011,7 +4000,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-global-executor", "lazy_static", @@ -4023,7 +4012,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "aes 0.8.3", "hmac 0.12.1", @@ -4036,7 +4025,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -4050,7 +4039,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "zenoh-config", @@ -4068,7 +4057,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "flume", @@ -4091,7 +4080,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "base64 0.21.4", @@ -4119,7 +4108,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "tokio", @@ -4137,7 +4126,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "base64 0.21.4", @@ -4165,7 +4154,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "socket2 0.5.6", @@ -4186,7 +4175,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "futures", @@ -4206,7 +4195,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "futures-util", @@ -4227,7 +4216,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "proc-macro2", "quote", @@ -4238,7 +4227,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "const_format", "libloading", @@ -4254,7 +4243,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "const_format", "rand 0.8.5", @@ -4268,7 +4257,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "anyhow", ] @@ -4276,7 +4265,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "futures", "lazy_static", @@ -4288,7 +4277,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "event-listener 4.0.0", "futures", @@ -4302,7 +4291,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "futures", "tokio", @@ -4315,7 +4304,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "flume", @@ -4347,7 +4336,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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-std", "async-trait", @@ -4370,7 +4359,7 @@ dependencies = [ [[package]] name = "zenoh_backend_traits" 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#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-std", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 539c87b..5a2c155 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,9 +45,9 @@ serde_json = "1.0.94" tracing = "0.1" uuid = { version = "1.3.0", features = ["v4"] } -zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing", features = ["unstable"] } -zenoh_backend_traits = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } -zenoh-plugin-trait = { version = "0.11.0-dev", git = "htttps://github.com/eclipse-zenoh/zenoh", branch = "feat/tracing" } -zenoh-collections = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } -zenoh-core = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } -zenoh-util = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "feat/tracing" } +zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = ["unstable"] } +zenoh_backend_traits = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } +zenoh-plugin-trait = { version = "0.11.0-dev", git = "htttps://github.com/eclipse-zenoh/zenoh", branch = "main" } +zenoh-collections = { 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 = "main" } diff --git a/v1/src/lib.rs b/v1/src/lib.rs index df2cf6e..d938a81 100644 --- a/v1/src/lib.rs +++ b/v1/src/lib.rs @@ -111,7 +111,7 @@ impl Plugin for InfluxDbBackend { const PLUGIN_LONG_VERSION: &'static str = plugin_long_version!(); fn start(_name: &str, config: &Self::StartArgs) -> ZResult { - zenoh_util::init_log(); + zenoh_util::init_log_from_env(); debug!("InfluxDB backend {}", Self::PLUGIN_VERSION); diff --git a/v2/src/lib.rs b/v2/src/lib.rs index bc47253..30dca03 100644 --- a/v2/src/lib.rs +++ b/v2/src/lib.rs @@ -139,7 +139,7 @@ impl Plugin for InfluxDbBackend { const PLUGIN_LONG_VERSION: &'static str = plugin_long_version!(); fn start(_name: &str, config: &Self::StartArgs) -> ZResult { - zenoh_util::init_log(); + zenoh_util::init_log_from_env(); tracing::debug!("InfluxDBv2 backend {}", Self::PLUGIN_VERSION);