Skip to content

Commit

Permalink
use stderr for sql debug prints (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein authored Sep 2, 2024
1 parent 315816e commit 12ddf7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datachain/data_storage/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ def _connect(db_file: Optional[str] = None):
db.execute("PRAGMA synchronous = NORMAL")
db.execute("PRAGMA case_sensitive_like = ON")
if os.environ.get("DEBUG_SHOW_SQL_QUERIES"):
db.set_trace_callback(print)
import sys

db.set_trace_callback(sys.stderr.write)

load_usearch_extension(db)

Expand Down

0 comments on commit 12ddf7b

Please sign in to comment.