Developer Parsa Aftabi has released logwhisper, a lightweight Go CLI tool designed to parse production logs and translate them into plain English summaries without sending data to the cloud. Submitted for the Hacktoberfest Open-Source AI Challenge, the tool leverages Ollama to run open-weight Llama 3.2 models locally, addressing the critical privacy concerns associated with pasting sensitive incident data into hosted AI APIs.

The Problem With Cloud-Based Log Analysis

Production logs often contain highly sensitive information, including user IDs, IP addresses, and specific query parameters. Aftabi notes that pasting this text into a hosted AI service means exposing it to external retention policies, a risky move during high-pressure 2 a.m. incidents. logwhisper eliminates this risk by keeping the entire analysis process on the local machine, costing nothing per call and functioning even with the network disconnected.

Architecture Built for Privacy and Speed

The tool is constructed as a single Go module with zero external dependencies, relying solely on the standard library. It features specific internal packages for chunking long logs into manageable pieces for small context windows, building prompts that separate observation from hypothesis to prevent model hallucinations, and a thin client for the Ollama API. The implementation includes robust error handling that provides exact commands to fix Ollama connectivity issues, rather than throwing generic dial errors.

Performance and Model Flexibility

logwhisper allows users to swap models easily, supporting both llama3.2:1b and llama3.2:3b. While the 1B model provides a line-by-line narration that is useful for quick scanning, the 3B model offers better cause-and-effect synthesis. The tool processes a 200-line incident log in seconds, reducing the initial reading time from roughly ten minutes to immediate, plain-English summaries that help on-call engineers start diagnosis faster.

Key Takeaways

  • logwhisper runs entirely locally using Ollama, ensuring no log data leaves the server.
  • The tool is written in Go with zero dependencies, making it easy to build and deploy.
  • Prompt engineering separates 'what happened' from 'likely cause' to reduce hallucinations.
  • Supports swappable models, allowing users to balance speed and accuracy with Llama 3.2 variants.

The Bottom Line

This is a pragmatic solution for a real-world pain point: privacy-compliant AI assistance during incidents. By keeping the stack local and dependency-free, logwhisper proves that you don't need a cloud API to get meaningful AI insights from your logs.