add documentation about logging
This commit is contained in:
parent
56fc641515
commit
643c1f6a1a
14
README.md
14
README.md
|
@ -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.
|
||||
|
|
15
src/main.rs
15
src/main.rs
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue