Expand description
A lightweight zero-heap logging library
Provides a Level type representing a log severity, four built-in levels
(Level::INFO, Level::WARN, Level::ERROR, Level::DEBUG), and
convenience macros (info!, warn!, error!, debug!) that mirror
the standard format! API.
Output is written to stdout for non-error levels and stderr for error levels. Each line is formatted as:
[<tag>] <PREFIX> : <message> # when a tag is supplied
<PREFIX> : <message> # without a tagThe prefix and message are styled with owo_colors according to the level.
The debug! macro compiles to a no-op in release builds.
Macros§
- debug
- Logs a debug message using
Level::DEBUG. - error
- Logs an error message using
Level::ERROR. - info
- Logs an informational message using
Level::INFO. - warn
- Logs a warning message using
Level::WARN.
Structs§
- Level
- A log level that controls the prefix label, colors, and output stream.
Functions§
- log
- Logs a message at the given
levelwithout a tag. - log_
tagged - Logs a message at the given
levelwith an optionaltag.