add documentation about logging

This commit is contained in:
glyph 2022-08-11 13:59:27 +01:00
parent 56fc641515
commit 643c1f6a1a
2 changed files with 29 additions and 0 deletions

View File

@ -53,6 +53,20 @@ This project is documented in the form of code comments and Rust doc comments. I
`cargo doc --open --no-deps`
## Logging
lykin emits logs at three levels: `debug`, `info` and `warn`. The log level can be set using the `RUST_LOG` environment variable.
For example, emit only `info` logs:
`RUST_LOG=lykin=info ./target/release/lykin`
It is also possible to emit logs solely from a single module of lykin.
For example, emit only `warn` logs from the `db` module of lykin:
`RUST_LOG=lykin::db=warn cargo run`
## Thanks
I am grateful to the Butts who voted to fund this work, all contributors to the SSBC and Erick Lavoie in particular - both for partially funding this work and for developing and overseeing the community grant process.

View File

@ -70,6 +70,21 @@
//!
//! `cargo doc --open --no-deps`
//!
//! ## Logging
//!
//! lykin emits logs at three levels: `debug`, `info` and `warn`. The log level
//! can be set using the `RUST_LOG` environment variable.
//!
//! For example, emit only `info` logs:
//!
//! `RUST_LOG=lykin=info ./target/release/lykin`
//!
//! It is also possible to emit logs solely from a single module of lykin.
//!
//! For example, emit only `warn` logs from the `db` module of lykin:
//!
//! `RUST_LOG=lykin::db=warn cargo run`
//!
//! ## Thanks
//!
//! I am grateful to the Butts who voted to fund this work, all contributors to