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
# errlog

errlog is a simple log library based on anyhow, it wraps file name and line number for your error
message.

Add the errlog dependencies into your Cargo.toml, then import errlog macro

    use errlog::{elog, AnyContext, AnyResult};

Now you can use it in function that return `AnyResult<xxx>` such as

    return Err(elog!("Unkown file type")); 

or

    File:open(filepath).context(elog!("Cannot open file {}", filepath))?;