Skip to content

Commit

Permalink
iter_log function
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouaix authored and mrguiman committed Apr 30, 2024
1 parent c43b93a commit 09c44a4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/unified_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,16 @@ impl LogData {
Ok((input, unified_log_data_true))
}

pub fn iter_log<'a>(
unified_log_data: &'a UnifiedLogData,
strings_data: &'a [UUIDText],
shared_strings: &'a [SharedCacheStrings],
timesync_data: &'a [TimesyncBoot],
exclude_missing: bool,
) -> Result<impl Iterator<Item = (Vec<LogData>, UnifiedLogData)> + 'a, regex::Error> {
LogIterator::new(unified_log_data, strings_data, shared_strings, timesync_data, exclude_missing)
}

/// Reconstruct Unified Log entries using the binary strings data, cached strings data, timesync data, and unified log. Provide bool to ignore log entries that are not able to be recontructed (additional tracev3 files needed)
/// Return a reconstructed log entries and any leftover Unified Log entries that could not be reconstructed (data may be stored in other tracev3 files)
pub fn build_log(
Expand Down

0 comments on commit 09c44a4

Please sign in to comment.