Skip to content

Commit

Permalink
add an iter_log method inside the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
mrguiman committed Apr 30, 2024
1 parent 09c44a4 commit deab1a7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ pub fn parse_log(full_path: &str) -> Result<UnifiedLogData, ParserError> {
}
}

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> {
LogData::iter_log(
unified_log_data,
strings_data,
shared_strings,
timesync_data,
exclude_missing,
)
}


/// Reconstruct Unified Log entries using the 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)
// Log entries with Oversize string entries may have the data in a different tracev3 file.
Expand Down

0 comments on commit deab1a7

Please sign in to comment.