errlog/lib.rs
1pub use anyhow::{self as Anyhow, Context as AnyContext, Result as AnyResult};
2
3#[macro_export]
4macro_rules! elog {
5 ($msg:literal $(,)?) => {
6 {
7 use errlog::Anyhow;
8 Anyhow::anyhow!(format!("[{}].[{}]: {}", file!(), line!(), $msg))
9 }
10 };
11 ($fmt:expr, $($arg:tt)*) => {
12 {
13 use errlog::Anyhow;
14 Anyhow::anyhow!(format!("[{}].[{}]: {}", file!(), line!(), format!($fmt, $($arg)*)))
15 }
16 };
17}