Crates.io | instant_log |
lib.rs | instant_log |
version | 0.1.2 |
source | src |
created_at | 2023-06-18 13:11:01.736271 |
updated_at | 2023-06-29 09:35:14.264451 |
description | A very simple logger |
homepage | |
repository | https://gitlab.com/waynes-crates/instant-log |
max_upload_size | |
id | 893472 |
size | 5,208 |
I really like logs in a very simple consistent way across my applications. This incredibly simple log with a timestamp, log level and a log message Console only, file options may be added but this is really intended for containers.
2023-06-18 14:26:00 - INFO - Hello World!
2023-06-18 14:26:10 - ERROR - Bye World!
use instant_log as log;
fn main() {
log::debug(format("Hello {}!", "World"));
log::info("Hello World!");
log::warn("Be careful!");
log::error("Too Late!");
log::fatal(format("error {}!", error.to_string()));
}
Configuration can be done via environment variable LOG_LEVEL
Valid log levels, defaults to INFO