A CLI tool that takes two log files (or streams) and highlights lines that appear in one but not the other — useful for comparing before/after deployments or debugging environment differences.

Why I built it

During a production incident we had two nearly-identical services behaving differently. The logs were 99% the same and diffing them manually was impossible. diff doesn’t work well on timestamped logs because timestamps always differ.

How it works

logdiff strips configurable fields (timestamps, request IDs) before comparing, then outputs a unified diff with color-coded additions and removals. It handles multi-line log entries and JSON logs natively.

logdiff --strip-timestamps --strip-field request_id \
  service-a.log service-b.log

What I learned

Rust’s BufReader is genuinely excellent for streaming large files. The whole thing processes 1GB log files in under 2 seconds on my M2.