Skip to content

Commit 7255d3d

Browse files
authored
Shift to tracing crate for logging (replacing log) (#1363)
* Update note to support GitHub rendering Signed-off-by: Srihari Thyagarajan <[email protected]> * `feat`: add `tracing` and `tracing-subscriber` deps * feat: add to workspace * `feat`: initialize tracing subscriber for logging with appropriate env filter * `refactor`: replace `log` with `tracing` * `refactor`: remove unused `log::warn` * `chore`: Implement tracing spans in builder * `refactor`: add tracing instrumentation to evaluate fn * `refactor`: use tracing integration accordingly * tracing instrumentation * replace `log::warn` with `tracing::warn` * tracing instrumentation for API endpoints * same here * replace `log` dependency with `tracing` * replace `log::error` with `tracing::error` * replace `log` with `tracing` crate * use `tracing::error` in batching module * replace `log::debug` with `tracing::debug` for error handling * replace `log::trace` with `tracing::trace` * changes * ci fix rust formatting * replace w/ tracing `instrumentation` --------- Signed-off-by: Srihari Thyagarajan <[email protected]>
1 parent 96ea4f0 commit 7255d3d

File tree

19 files changed

+126
-140
lines changed

19 files changed

+126
-140
lines changed

Cargo.lock

Lines changed: 77 additions & 125 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ config = "0.15.19"
2929
const_format = "0.2.35"
3030
futures = "0.3.31"
3131
log = "0.4.28"
32+
tracing = { version = "0.1", features = ["log"] }
33+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
3234
regex = "1.12.2"
3335
serde = { version = "1.0.228", features = ["derive"] }
3436
serde_json = "1.0.145"

rust/cocoindex/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ chrono = { workspace = true }
3737
config = { workspace = true }
3838
const_format = { workspace = true }
3939
futures = { workspace = true }
40+
tracing = { workspace = true }
41+
tracing-subscriber = { workspace = true }
4042
log = { workspace = true }
4143
regex = { workspace = true }
4244
serde = { workspace = true }
@@ -55,7 +57,6 @@ itertools = { workspace = true }
5557
derivative = { workspace = true }
5658
hex = { workspace = true }
5759
schemars = { workspace = true }
58-
env_logger = { workspace = true }
5960
reqwest = { workspace = true }
6061
async-openai = { workspace = true }
6162

rust/cocoindex/src/base/value.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use crate::base::duration::parse_duration;
55
use base64::prelude::*;
66
use bytes::Bytes;
77
use chrono::Offset;
8-
use log::warn;
98
use serde::{
109
de::{SeqAccess, Visitor},
1110
ser::{SerializeMap, SerializeSeq, SerializeTuple},

0 commit comments

Comments
 (0)