diff --git a/README.md b/README.md index 0dfba0cf..f37ba9b2 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,15 @@ valve --help ``` to see command line options. +### Logging +By default Valve only logs error messages. To also enable warning and information messages, +set the environment variable `RUST_LOG` to the minimum logging level desired for ontodev_valve: +`debug`, `info`, `warn`, or `error`. +For instance: +```rust +export RUST_LOG="ontodev_valve=info" +``` + ### Python bindings See [valve.py](https://github.com/ontodev/valve.py) diff --git a/src/lib.rs b/src/lib.rs index 835f5cd4..aed69520 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,6 +15,15 @@ //! ``` //! to see command line options. //! +//! ## Logging +//! By default Valve only logs error messages. To also enable warning and information messages, +//! set the environment variable `RUST_LOG` to the minimum logging level desired for ontodev_valve: +//! `debug`, `info`, `warn`, or `error`. +//! For instance: +//! ``` +//! export RUST_LOG="ontodev_valve=info" +//! ``` +//! //! ## Python bindings //! See [valve.py](https://github.com/ontodev/valve.py) diff --git a/src/valve.rs b/src/valve.rs index 8a87e7e1..dfb80ac2 100644 --- a/src/valve.rs +++ b/src/valve.rs @@ -1132,9 +1132,11 @@ impl Valve { self.load_tables(&table_list, validate).await } - /// Given a vector of table names, load those tables in the given order. If `validate` is false, - /// just try to insert all rows, irrespective of whether they are valid or not or will possibly - /// trigger a db error. + /// Given a vector of table names, truncate each table, as well as any that depend on a given + /// table via a foreign key dependency, then load the tables in `table_list` in the given order. + /// If `validate` is false, just try to insert all rows, irrespective of whether they are valid + /// or not or whether they may trigger a db error, otherwise all rows are validated as they are + /// inserted to the database. pub async fn load_tables( &self, table_list: &Vec<&str>,