Crates.io | logid-derive |
lib.rs | logid-derive |
version | 0.12.2 |
source | src |
created_at | 2023-05-12 21:39:34.460755 |
updated_at | 2023-08-30 09:35:19.907268 |
description | Provides derive macros for the [logid](https://crates.io/crates/logid) logging framework. |
homepage | |
repository | https://github.com/mhatzl/logid |
max_upload_size | |
id | 863317 |
size | 8,674 |
Rust logging framework using IDs to identify log events.
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)
}
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.
MIT Licensed