mirror of
https://github.com/trussed-dev/delog.git
synced 2026-06-20 04:16:34 -07:00
23 lines
440 B
Rust
23 lines
440 B
Rust
#[macro_use]
|
|
extern crate delog;
|
|
|
|
use delog::log::info;
|
|
|
|
use delog::example::StdoutFlusher;
|
|
|
|
delog!(Delogger, 25, StdoutFlusher);
|
|
|
|
static STDOUT_FLUSHER: StdoutFlusher = StdoutFlusher {};
|
|
|
|
fn main() {
|
|
Delogger::init_default(delog::LevelFilter::Info, &STDOUT_FLUSHER).ok();
|
|
|
|
let msg = "1234567890";
|
|
|
|
// this logs more than fits the buffer
|
|
(0..10).for_each(|_| {
|
|
info!("{}", msg);
|
|
Delogger::flush();
|
|
});
|
|
}
|