LogStrip Log Compression
Use LogStrip when a user provides or points to a verbose log and wants the diagnostic signal preserved while noise is removed.
Procedure
- Identify the input log path and desired output path. If no output path is given, use
<input>.logstrip.log. - Verify
logstripis already installed. If missing, instruct the user to runnpm i -g logstrip. - Run
logstrip <input> -o <output> --stats, adding--aggressiveness <level>when requested. - Report the output path, savings percentage, estimated input/output tokens, dropped lines, duplicate lines, and hidden internal stack lines.
- If the command fails, show the concise error and suggest the smallest next step.
Guardrails
- Do not print raw logs unless the user explicitly asks for excerpts.
- Do not install packages automatically.
- Do not use
--jsonunless an output path is present. - Keep stats separate from compressed content when piping.