logid

Crates.iologid
lib.rslogid
version0.12.2
sourcesrc
created_at2022-07-23 23:44:05.525168
updated_at2023-08-30 09:35:38.968305
descriptionRust logging framework using IDs to identify log entries.
homepage
repositoryhttps://github.com/mhatzl/logid
max_upload_size
id631764
size60,280
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