Crates.io | ferretlog |
lib.rs | ferretlog |
version | 0.1.1 |
source | src |
created_at | 2023-10-29 12:51:32.436283 |
updated_at | 2023-10-29 13:39:11.885145 |
description | Tiny and simple logging macro for Rust |
homepage | |
repository | |
max_upload_size | |
id | 1017524 |
size | 4,857 |
Tiny and simple logging macro for Rust. Based on the piglog crate but extended with default log levels and limited crate requirements.
use ferretlog::*;
fn main() {
ferretlog::critical!("Hello, world!");
ferretlog::error!("Hello, world!");
ferretlog::warning!("Hello, world!");
ferretlog::notice!("Hello, world!");
ferretlog::info!("Hello, world!");
ferretlog::debug!("Hello, world!");
ferretlog::todo!("Hello, world!");
}
This crate support the following log levels. These can be set using the LOG_LEVEL
environment variable.
Log Level | Description |
---|---|
Critical | Signifies critical conditions in the program that demand intervention to prevent system failure. |
Error | Indicates error conditions that impair some operation but are less severe than critical situations. |
Warning | Signifies potential issues that may lead to errors or unexpected behavior in the future if not addressed. |
Notice | Applies to normal but significant conditions that may require monitoring. |
Info | Includes messages that provide a record of the normal operation of the application. |
Debug | Intended for logging detailed information about the application for debugging purposes. |
Todo | Indended as an additional tool to log todo items. |