Skip to content

Commit a0ab37b

Browse files
chore: remove high-frequency debug logs from SQLite connection utils (#1082)
Per-connection PRAGMA and open/close debug lines fire on every DB access, flooding the detail log during mass-eval runs. The PRAGMA configuration is self-evident from the code; no diagnostic value is lost. Co-authored-by: florath-ai-assistant[bot] <Andreas.Florath@telekom.de>
1 parent 81a1d8c commit a0ab37b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/aletheia_probe/cache/connection_utils.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
from contextlib import contextmanager
1616
from pathlib import Path
1717

18-
from ..logging_config import get_detail_logger
19-
20-
21-
detail_logger = get_detail_logger()
22-
2318

2419
def configure_sqlite_connection(
2520
conn: sqlite3.Connection,
@@ -37,20 +32,12 @@ def configure_sqlite_connection(
3732
conn: SQLite database connection to configure
3833
enable_wal: Whether to enable WAL mode (default: True)
3934
"""
40-
detail_logger.debug("Configuring SQLite PRAGMA settings")
41-
4235
if enable_wal:
4336
conn.execute("PRAGMA journal_mode = WAL")
44-
detail_logger.debug("Set PRAGMA journal_mode = WAL")
4537

4638
conn.execute("PRAGMA synchronous = NORMAL")
47-
detail_logger.debug("Set PRAGMA synchronous = NORMAL")
48-
4939
conn.execute("PRAGMA cache_size = 10000")
50-
detail_logger.debug("Set PRAGMA cache_size = 10000")
51-
5240
conn.execute("PRAGMA temp_store = MEMORY")
53-
detail_logger.debug("Set PRAGMA temp_store = MEMORY")
5441

5542

5643
@contextmanager
@@ -84,10 +71,6 @@ def get_configured_connection(
8471
results = cursor.fetchall()
8572
```
8673
"""
87-
detail_logger.debug(
88-
f"Opening SQLite connection to {db_path} with {timeout}s timeout"
89-
)
90-
9174
# Convert Path to string for sqlite3.connect()
9275
db_path_str = str(db_path)
9376

@@ -106,7 +89,6 @@ def get_configured_connection(
10689
raise
10790
finally:
10891
conn.close()
109-
detail_logger.debug(f"Closed SQLite connection to {db_path}")
11092

11193

11294
@contextmanager

0 commit comments

Comments
 (0)