diff --git a/CHANGELOG.md b/CHANGELOG.md index 91db17c7..2449508b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ This changelog documents the changes between release versions. ## [Unreleased] +- Enables logging events from the MongoDB driver by setting the `RUST_LOG` variable ([#67](https://github.com/hasura/ndc-mongodb/pull/67)) + - To log all events set `RUST_LOG=mongodb::command=debug,mongodb::connection=debug,mongodb::server_selection=debug,mongodb::topology=debug` ## [0.0.5] - 2024-04-26 - Fix incorrect order of results for query requests with more than 10 variable sets (#37) diff --git a/Cargo.lock b/Cargo.lock index 0b3f493d..95c13b92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1610,6 +1610,7 @@ dependencies = [ "hex", "hmac", "lazy_static", + "log", "md-5", "pbkdf2", "percent-encoding", @@ -1630,6 +1631,7 @@ dependencies = [ "tokio", "tokio-rustls 0.24.1", "tokio-util", + "tracing", "trust-dns-proto", "trust-dns-resolver", "typed-builder 0.10.0", diff --git a/Cargo.toml b/Cargo.toml index c39c809d..b0c277fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,7 @@ ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs.git" } ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.2" } itertools = "^0.12.1" +mongodb = { version = "2.8", features = ["tracing-unstable"] } # Connecting to MongoDB Atlas database with time series collections fails in the # latest released version of the MongoDB Rust driver. A fix has been merged, but diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 80f3268f..bba31456 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -6,7 +6,7 @@ version.workspace = true [dependencies] configuration = { path = "../configuration" } mongodb-agent-common = { path = "../mongodb-agent-common" } -mongodb = "2.8" +mongodb = { workspace = true } mongodb-support = { path = "../mongodb-support" } anyhow = "1.0.80" diff --git a/crates/configuration/Cargo.toml b/crates/configuration/Cargo.toml index a4dcc197..0bb952f2 100644 --- a/crates/configuration/Cargo.toml +++ b/crates/configuration/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" anyhow = "1" futures = "^0.3" itertools = { workspace = true } -mongodb = "2.8" +mongodb = { workspace = true } mongodb-support = { path = "../mongodb-support" } ndc-models = { workspace = true } schemars = "^0.8.12" diff --git a/crates/dc-api-types/Cargo.toml b/crates/dc-api-types/Cargo.toml index 61cfa52f..a2b61b0e 100644 --- a/crates/dc-api-types/Cargo.toml +++ b/crates/dc-api-types/Cargo.toml @@ -16,5 +16,5 @@ serde_with = "3" [dev-dependencies] anyhow = "1" -mongodb = "2" +mongodb = { workspace = true } pretty_assertions = "1" diff --git a/crates/mongodb-agent-common/Cargo.toml b/crates/mongodb-agent-common/Cargo.toml index e6a9ab7e..80871a40 100644 --- a/crates/mongodb-agent-common/Cargo.toml +++ b/crates/mongodb-agent-common/Cargo.toml @@ -21,7 +21,7 @@ http = "^0.2" indexmap = { version = "1", features = ["serde"] } # must match the version that ndc-client uses indent = "^0.1" itertools = { workspace = true } -mongodb = "2.8" +mongodb = { workspace = true } once_cell = "1" regex = "1" schemars = { version = "^0.8.12", features = ["smol_str"] } diff --git a/crates/mongodb-connector/Cargo.toml b/crates/mongodb-connector/Cargo.toml index 1c39372f..a8b8fcf5 100644 --- a/crates/mongodb-connector/Cargo.toml +++ b/crates/mongodb-connector/Cargo.toml @@ -15,7 +15,7 @@ http = "^0.2" indexmap = { version = "2.1.0", features = ["serde"] } itertools = { workspace = true } lazy_static = "^1.4.0" -mongodb = "2.8" +mongodb = { workspace = true } mongodb-agent-common = { path = "../mongodb-agent-common" } mongodb-support = { path = "../mongodb-support" } ndc-sdk = { workspace = true } diff --git a/crates/mongodb-support/Cargo.toml b/crates/mongodb-support/Cargo.toml index aecfc7f8..a9a42a92 100644 --- a/crates/mongodb-support/Cargo.toml +++ b/crates/mongodb-support/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" dc-api-types = { path = "../dc-api-types" } enum-iterator = "^2.0.0" indexmap = { version = "1", features = ["serde"] } # must match the version that ndc-client uses -mongodb = "2.8" +mongodb = { workspace = true } schemars = "^0.8.12" serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/crates/test-helpers/Cargo.toml b/crates/test-helpers/Cargo.toml index fc113da3..27c4ad6d 100644 --- a/crates/test-helpers/Cargo.toml +++ b/crates/test-helpers/Cargo.toml @@ -8,6 +8,6 @@ configuration = { path = "../configuration" } mongodb-support = { path = "../mongodb-support" } enum-iterator = "^2.0.0" -mongodb = "2.8" +mongodb = { workspace = true } proptest = "1"