diff --git a/docs/logging.md b/docs/logging.md new file mode 100644 index 0000000..5a5b351 --- /dev/null +++ b/docs/logging.md @@ -0,0 +1,32 @@ +# Logging + +`divnet-rs` logs various things to standard error during a run. + +## Log levels + +There are multiple log levels. Here they are from least important to most important. + +- `trace` +- `debug` +- `info` +- `warn` +- `error` + +By default `divnet-rs` only prints `info`, `warn`, and `error` messages. + +If you want, you can turn on the lower level messages using the `RUST_LOG` [environmental variable](https://www.digitalocean.com/community/tutorials/how-to-read-and-set-environmental-and-shell-variables-on-linux) like this: + +``` +RUST_LOG=debug divnet-rs config.toml +``` + +That would tell `divnet-rs` to print all `debug` messages plus any messages that are of higher importance (`info`, `warn`, and `error`). + +If you want fewer messages, you could use `RUST_LOG=warn` or `RUST_LOG=error`. + +## Recommendation + +Generally the default log level is fine. It's also nice since you don't have to set any environmental variables! + +If you have very large input files and want to see the most logging, for example to try and estimate the time remaining, you could turn on mode messages with `RUST_LOG=trace` or `RUST_LOG=trace`. It will put a lot of output though. +