Skip to content

Commit

Permalink
Wire in libSQL crate logging
Browse files Browse the repository at this point in the history
You can now turn on logging with `RUST_LOG=debug` environment variable.
  • Loading branch information
penberg committed Nov 29, 2023
1 parent a3e0176 commit 7b3e384
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
68 changes: 68 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ crate-type = ["cdylib"]
pyo3 = "0.19.0"
libsql = { git = "https://github.com/tursodatabase/libsql/", rev = "365d92124321de378cf1aaf5100c08efb8f046dd" }
tokio = { version = "1.29.1", features = [ "rt-multi-thread" ] }
tracing-subscriber = "0.3"
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ create_exception!(libsql_experimental, Error, pyo3::exceptions::PyException);

#[pymodule]
fn libsql_experimental(py: Python, m: &PyModule) -> PyResult<()> {
let _ = tracing_subscriber::fmt::try_init();
m.add("paramstyle", "qmark")?;
m.add("sqlite_version_info", (3, 42, 0))?;
m.add("Error", py.get_type::<Error>())?;
Expand Down

0 comments on commit 7b3e384

Please sign in to comment.