Skip to main content

strip_log_entry

Function strip_log_entry 

Source
pub fn strip_log_entry(log: &str) -> String
Expand description

In fully-deterministic modes, many log lines should be fully determinstic across runs. But as that is a work-in-progress, this utility strips known-nondeterministic information from logs.

This erasure is deliberately lossy and is NOT a parity claim: it backs the Stripped comparator only (bitwise_parity: false). BitwiseInfoV1 canonicalizes rather than erases – see canonicalize_addresses_in_line. Lossy as it is, each pattern must still erase only what it names: erasing a neighbouring field turns a real divergence into a reported match.

Example input/output: Input: COMMIT turn 3, dettid 231635 using resources Resources { tid: DetPid { inner: 231635 }, resources: {Path("/proc/231635/fd/1"): W} } Output: COMMIT turn <NUM>, dettid <NUM> using resources Resources { tid: DetPid { inner: <NUM> }, resources: {Path("/proc/<pid>/fd/<num>"): W} }

As you can see this is overkill and smarter strategies would be possible. For example, ones that remember and post-facto-determinize certain identifiers.