Expand description
An ultra simple no-configuration logger with colored output and zero dependencies.Just add it to dependencies and initalize it as soon as possible.
use log::*;
use min_logger::Logger;
fn main
{
SimplestLogger::initalize();
// your code!
}
SimplestLogger gives lots of line length for longer messages, and uses easily-distingusishable but theme respecting (ANSI) terminal colors.
We also have some constants you can use to more easily line things up.
Those feature flags aren’t really “features”, what they do is allows all logs
in debug, but tells the rust compiler to remove any and all trace!
and
debug!
macros invocations at compile time, meaning you have exactly zero
overhead or performance loss for those macros: only info, warning, and error
have any processing power required in production.
In fact, if you want you can even do release_max_level_off
and get no cost
for any logs in production! Useful for embedded systems and tight storage
constraints–since you can omit the entire log and SimplestLogger crates.
Structs§
- Logger
- Logger structure required for implementation.
Constants§
- INDENT
- Use this to indent any text that goes beyond the 72 character mark so it lines up nicely with the end of the level.