captains-log 0.15.4

A minimalist customizable logger for rust, based on the `log` crate, but also adapted to `tracing`, for production and testing scenario.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use chrono::{DateTime, Local};

pub struct Timer(DateTime<Local>);

impl std::ops::Deref for Timer {
    type Target = DateTime<Local>;

    fn deref(&self) -> &Self::Target {
        &self.0
    }
}

impl Timer {
    pub(crate) fn new() -> Self {
        return Self(Local::now());
    }
}