2 releases
0.1.1 | Jun 4, 2024 |
---|---|
0.1.0 | Jun 3, 2024 |
#403 in Debugging
100KB
219 lines
glug: a logger with graphical elements.
the sidebar
the sidebar (the meat and potatoes of glug) will show you what types of logs you're getting and how many. Is this useful? Maybe. Is it cool? Maybe.
lib.rs
:
Logger with graphical elements. For use with log
crate.
The logger writes to stderr with ANSI escape codes to display logs and aggregate data.
Could be useful if a program or library logs en masse.
How to use
The glug
logger uses a dedicated writer thread. This thread runs until told to stop. To stop
the logger properly, it is a good idea to use GLogger::end
and JoinHandle::join
like so:
(yes, this example is everywhere in this doc)
fn main() {
let (writer, logger) = glug::GLogger::setup();
log::info!("logged a message");
logger.end();
writer.join().unwrap();
}