Skip to main content

log_diff

Function log_diff 

Source
pub fn log_diff(file_a: &Path, file_b: &Path, opts: &LogDiffOpts) -> bool
Expand description

Process log messages from two files. Log messages look like this: “Apr 09 06:08:03.100 INFO detcore: [detcore, dtid 2] finish syscall: close(2) = Ok(0)”

With some complexities:

  • Some entries are multi-line (contain newlines).
  • Some stripping of nondeterministic information is needed for direct comparability.
  • Certain lines are intended to be deterministic/comparable, in their contents, and others in their presence but not their details.

Reports only whether the two files differ. See log_diff_detailed when the caller must also know how many messages were actually compared; a bare false here cannot distinguish a match from an empty comparison.