Crates.io | knil |
lib.rs | knil |
version | 0.1.3 |
source | src |
created_at | 2020-12-02 14:46:09.285329 |
updated_at | 2023-05-15 22:23:38.250456 |
description | An environment based logger, built with simplicity in mind. |
homepage | |
repository | https://github.com/whoastonic/knil.git |
max_upload_size | |
id | 318911 |
size | 6,069 |
An simple logger based on environment!
# get log and the package from crates
[dependencies]
log = "0.4"
knil = "0.1"
use std::io;
fn main () -> io::Result<()> {
knil::init()?;
info!("Hello, World!")
}
What about the environment thing? Don't worry it's very simple, the environment
soley depends on the: RUST_ENV
, you can directly set the environment level by
setting the RUST_ENV
with the corresponding level:
error = 0
warn = 1
info = 2
debug = 3
trace = 4
There also level presets such as:
development = 4
production = 2
staging = 3
max = 4
min = 0
By default the level is set to the development
preset.
Uh, make an Issue or Pull Request if you wanna see something changed or configured.