Guide
cleaning log files before analysis
A practical TinyDevTools guide.
Start with an untouched copy
Keep the original log. Cleanup should produce a derived working copy so you can return to the source when a pattern needs verification.
A practical sequence
- Remove irrelevant blank lines if they add no diagnostic value.
- Trim accidental outer whitespace when it is known to be formatting noise.
- Find duplicates before removing them; repetition may itself be evidence.
- Remove duplicates only when repeated identical lines are known to be redundant.
- Sort only when chronology is no longer important and grouping helps analysis.
Preserve meaning
Logs are evidence. A transformation that makes them prettier can also make them less useful. Do not sort a chronological log merely to make repeated messages easier to see.