errlog 0.0.2

A simple error logger based on anyhow
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub use anyhow::{self as Anyhow, Context as AnyContext, Result as AnyResult};

#[macro_export]
macro_rules! elog {
    ($msg:literal $(,)?) => {
        {
            use errlog::Anyhow;
            Anyhow::anyhow!(format!("[{}].[{}]: {}", file!(), line!(), $msg))
        }
    };
    ($fmt:expr, $($arg:tt)*) => {
        {
            use errlog::Anyhow;
            Anyhow::anyhow!(format!("[{}].[{}]: {}", file!(), line!(), format!($fmt, $($arg)*)))
        }
    };
}