logid-derive

Crates.iologid-derive
lib.rslogid-derive
version0.12.2
sourcesrc
created_at2023-05-12 21:39:34.460755
updated_at2023-08-30 09:35:19.907268
descriptionProvides derive macros for the [logid](https://crates.io/crates/logid) logging framework.
homepage
repositoryhttps://github.com/mhatzl/logid
max_upload_size
id863317
size8,674
Manuel Hatzl (mhatzl)

documentation

README

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

Commit count: 95

cargo fmt