7 unstable releases (3 breaking)

0.12.2 Aug 30, 2023
0.12.1 Aug 19, 2023
0.11.0 Jul 22, 2023
0.9.0 Jun 8, 2023
0.8.0 May 17, 2023

#775 in Debugging

Download history 63/week @ 2024-01-15 5/week @ 2024-01-22 13/week @ 2024-02-19 19/week @ 2024-02-26 56/week @ 2024-03-04 13/week @ 2024-03-11 14/week @ 2024-03-18 124/week @ 2024-04-01

156 downloads per month
Used in 3 crates (2 directly)

MIT license

70KB
2K SLoC

logid

Rust logging framework using IDs to identify log events.

Using logid

use logid::{log_id::{LogId, LogLevel}, err, ErrLogId};
use thiserror::Error;

#[derive(Debug, Clone, ErrLogId, Error)]
enum CrateError {
    #[error("`SomeError` description.")]
    SomeError,

    #[error("`InternalError` description.")]
    InternalError,
}

fn my_func() -> Result<(), CrateError> {
    // some code ...
    
    // on error
    err!(CrateError::SomeError)
}

Contributing

There is not yet a contributing guideline, but feel free to create issues and/or pull requests.

Note that any contribution submitted to logid is going to be MIT licensed.

License

MIT Licensed

Dependencies

~0.5–1.2MB
~26K SLoC