diff --git a/Cargo.toml b/Cargo.toml index bb55079c..d3041e0a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,8 @@ ndarray = "0.15.3" polars = { version = "0.37.0", features = ["lazy", "rows", "ndarray"] } pyo3-polars = "0.11.1" pyo3 = { version = "0.20.2" } -tracing = "0.1" +pyo3-log = "0.9.0" +tracing = { version ="0.1", features = ["log"] } csv = "1.1" hdf5 = { version="0.8.1" } hdf5-sys = { version="0.8.1", features=["static"] } diff --git a/pywr-python/Cargo.toml b/pywr-python/Cargo.toml index 06b92d37..ce2b7b46 100644 --- a/pywr-python/Cargo.toml +++ b/pywr-python/Cargo.toml @@ -16,6 +16,7 @@ categories = ["science", "simulation"] [dependencies] pyo3 = { workspace = true } pyo3-polars = { workspace = true } +pyo3-log = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } time = { workspace = true, features = ["serde", "serde-well-known", "serde-human-readable", "macros"] } diff --git a/pywr-python/src/lib.rs b/pywr-python/src/lib.rs index 0ed1c73a..e817e9b7 100644 --- a/pywr-python/src/lib.rs +++ b/pywr-python/src/lib.rs @@ -196,6 +196,8 @@ fn build_highs_settings(kwargs: Option<&PyDict>) -> PyResult PyResult<()> { + pyo3_log::init(); + m.add_class::()?; m.add_class::()?;