plog 0.2.16

A modular pretty logger written for Rust programs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use plog::{info, ok};
use std::{thread, time::Duration};

fn main() {
    let threads: Vec<_> = (0..=10)
        .map(|id| {
            info!("Creating thread {id}");
            thread::spawn(move || {
                thread::sleep(Duration::from_millis(1000));
                ok!("Thread {id} terminated");
            })
        })
        .collect();

    threads.into_iter().for_each(|thr| thr.join().unwrap());
}