enable logging in python program

main
Ziyang Hu 2 years ago
parent 4d8e560a96
commit 6d668b04d0

@ -11,5 +11,6 @@ crate-type = ["cdylib"]
[dependencies]
serde_json = "1.0.81"
anyhow = "1.0.58"
env_logger = "0.9.0"
pyo3 = { version = "0.16.5", features = ["extension-module"] }
cozo = { path = ".." }

@ -36,6 +36,7 @@ impl CozoDbPy {
#[new]
#[args(create_if_missing = true, destroy_on_exit = false)]
fn new(path: &str, create_if_missing: bool, destroy_on_exit: bool) -> PyResult<Self> {
let _ = env_logger::try_init();
let builder = DbBuilder::default()
.path(path)
.create_if_missing(create_if_missing)

Loading…
Cancel
Save