Rust logging implementation modeled after the Go standard library log package.
It works with the log
crate.
See docs.rs.
```rust use log::{debug}; use logosaurus::{Logger};
fn main() { logosaurus::init(Logger::default()).unwrap(); debug!("hello, world"); // DEBUG 2020/10/02 21:27:03 hello, world } ```
```rust use log::{self, debug}; use logosaurus::{Logger, LSTD, LSHORTFILE, LMICROSECONDS}; use std::io;
fn main() { let logger = Logger::builder(io::stdout()) .setlevel(log::LevelFilter::Debug) .setflags(LSTD | LSHORTFILE | LMICROSECONDS) .set_prefix("myprogram: ") .build();
logosaurus::init(logger).unwrap(); debug!("hello, world"); // myprogram: DEBUG 2020/10/02 21:27:03.123123 main.rs:12: hello, world } ```