Trait logid::capturing::LogIdTracing
source · [−]pub trait LogIdTracing {
fn set_event<'a>(
self,
msg: &str,
filename: &str,
line_nr: u32
) -> MappedLogId<'a>;
fn set_event_with<'a>(
self,
log_map: &'a LogIdMap,
msg: &str,
filename: &str,
line_nr: u32
) -> MappedLogId<'a>;
fn set_silent_event<'a>(
self,
msg: &str,
filename: &str,
line_nr: u32
) -> MappedLogId<'a>;
}
Expand description
Trait to use LogId
for tracing.
Required Methods
Set an event for a LogId
using the global LogIdMap
reference [LOG_ID_MAP
].
Arguments
msg
- main message that is set for this log-id (should be a user-centered event description)filename
- name of the source file where the event is set (Note: usefile!()
)line_nr
- line number where the event is set (Note: useline!()
)
fn set_event_with<'a>(
self,
log_map: &'a LogIdMap,
msg: &str,
filename: &str,
line_nr: u32
) -> MappedLogId<'a>
fn set_event_with<'a>(
self,
log_map: &'a LogIdMap,
msg: &str,
filename: &str,
line_nr: u32
) -> MappedLogId<'a>
Set an event for a LogId
using a given LogIdMap
.
Arguments
log_map
- the map the log-id and all its addons are captured inmsg
- main message that is set for this log-id (should be a user-centered event description)filename
- name of the source file where the event is set (Note: usefile!()
)line_nr
- line number where the event is set (Note: useline!()
)
fn set_silent_event<'a>(
self,
msg: &str,
filename: &str,
line_nr: u32
) -> MappedLogId<'a>
fn set_silent_event<'a>(
self,
msg: &str,
filename: &str,
line_nr: u32
) -> MappedLogId<'a>
Set an event for a LogId
without adding it to a LogIdMap
.
Arguments
msg
- main message that is set for this log-id (should be a user-centered event description)filename
- name of the source file where the event is set (Note: usefile!()
)line_nr
- line number where the event is set (Note: useline!()
)