Expand description
A simple, zero-setup logger. A simple, “zero-setup” logger that works out-of-the-box.
This module provides a set of functions for logging messages at different
levels (info, warn, error, debug). It automatically initializes
on the first log call and respects the RUST_LOG environment variable.
§Example
use tincre_logger::logger;
fn main() {
logger::info("Server has started.");
logger::warn("Low disk space detected.");
logger::error("Failed to connect to database!");
// To see debug messages, run with `RUST_LOG=debug`
logger::debug("User 'admin' logged in.");
}Functions§
- debug
- Logs a message at the
DEBUGlevel. - debug_
with - Logs a message at the
DEBUGlevel with additional structured metadata. - error
- Logs a message at the
ERRORlevel. - error_
with - Logs a message at the
ERRORlevel with additional structured metadata. - info
- Logs a message at the
INFOlevel. - info_
with - Logs a message at the
INFOlevel with additional structured metadata. - log
- Logs a message at the
INFOlevel. This is an alias forinfo(). - warn
- Logs a message at the
WARNlevel. - warn_
with - Logs a message at the
WARNlevel with additional structured metadata.