Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

feat: drop sqlx logging (#10398)

jif-oai34c0534f6eb8
diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock
index 4614e5f24f..57186f82f1 100644
--- a/codex-rs/Cargo.lock
+++ b/codex-rs/Cargo.lock
@@ -1901,6 +1901,7 @@ dependencies = [
"codex-otel",
"codex-protocol",
"dirs",
+ "log",
"owo-colors",
"pretty_assertions",
"serde",
diff --git a/codex-rs/state/Cargo.toml b/codex-rs/state/Cargo.toml
index 6019b5888b..837d451387 100644
--- a/codex-rs/state/Cargo.toml
+++ b/codex-rs/state/Cargo.toml
@@ -11,6 +11,7 @@ clap = { workspace = true, features = ["derive", "env"] }
codex-otel = { workspace = true }
codex-protocol = { workspace = true }
dirs = { workspace = true }
+log = { workspace = true }
owo-colors = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
diff --git a/codex-rs/state/src/runtime.rs b/codex-rs/state/src/runtime.rs
index 39c79c32b9..6f2e128967 100644
--- a/codex-rs/state/src/runtime.rs
+++ b/codex-rs/state/src/runtime.rs
@@ -17,6 +17,8 @@ use chrono::Utc;
use codex_otel::OtelManager;
use codex_protocol::ThreadId;
use codex_protocol::protocol::RolloutItem;
+use log::LevelFilter;
+use sqlx::ConnectOptions;
use sqlx::QueryBuilder;
use sqlx::Row;
use sqlx::Sqlite;
@@ -511,7 +513,8 @@ async fn open_sqlite(path: &Path) -> anyhow::Result<SqlitePool> {
.create_if_missing(true)
.journal_mode(SqliteJournalMode::Wal)
.synchronous(SqliteSynchronous::Normal)
- .busy_timeout(Duration::from_secs(5));
+ .busy_timeout(Duration::from_secs(5))
+ .log_statements(LevelFilter::Off);
let pool = SqlitePoolOptions::new()
.max_connections(5)
.connect_with(options)