Crate logid

source ·
Expand description

Library providing functionalities to set and capture log_id::LogIds.


use logid::{log_id::{LogId, EventLevel, get_log_id}, capturing::LogIdTracing};

const SOME_ERROR: LogId = get_log_id(0, 0, EventLevel::Error, 0);

fn my_func() -> Result<usize, LogId> {
  // some code ...

  // on error
  Err(SOME_ERROR.set_event("Some error message", file!(), line!())
      .add_cause("Cause of error -> unknown").finalize()  


Offers functionality to set an event on a LogId and capture its content in a LogIdMap.
Contains the LogIdEntry definition used to capture messages for a log-id.
Contains the LogIdMap definition used to capture LogIds and their LogIdEntrys.
Contains the LogId type and functions to create log IDs