LogLoom: Treasure Maps for Logs --> Because Grepping Your Codebase at 2 a.m. Is Getting Old

    Jonathan Doughty, Founder, Fremen LabsMay 15, 20268 min read
    LogLoom: Treasure Maps for Logs --> Because Grepping Your Codebase at 2 a.m. Is Getting Old

    We built LogLoom in early 2026 because we were exhausted by the same painful debugging loop that every engineer knows too well.

    What: LogLoom is a build-time observability primitive that scans your source code like Python, TypeScript, Go, and more using Logloom, builds a stable semantic knowledge graph, and injects tiny, permanent references into every log event at runtime. Why: So that both humans and AI agents can instantly answer questions like “which file and function emitted this error?”, “what’s the blast radius if this function fails?”, and “which module is the noisiest?” — without guessing or loading massive context. Where: It works anywhere your code runs —-> local machines, Docker containers, Kubernetes pods, and production Elastic clusters. When: The magic happens at build time (CI/CD) and stays with your logs forever, turning opaque text streams into queryable code provenance.

    LogLoom Architecture — Data Flow

    Build-Time (CI/CD)Runtime (Application)BridgesSource CodePy / Go / TSAST Scanner+ Graph BuilderKnowledge Graphlogloom-graph.jsonlogger.info(...)Your App CodeLogLoom ResolverNode ID → MetadataEnriched Log Eventfile + func + edgesES ShipperBulk APIOTEL ProcessorSpan EnrichmentEnrichment IndexElasticsearchObservabilityKibana / GrafanaNode ID lookup

    You know the ritual: an error pops up in production logs, and the first thing you do is play detective — grep -rn "Failed to connect" across a growing codebase, hoping the string hasn’t been dynamically generated or split across three files by some well-meaning junior developer.

    After running LogLoom on three real production codebases (Elastro in Python, Vorsam in TypeScript, and Flume in Go), we can now say with confidence: that ritual is officially obsolete.

    The Numbers That Made Us Believe

    On the Flume Go gateway (66 files, 17.8k lines, a distributed LLM inference router with circuit breakers, ensembles, and multi-provider routing), LogLoom produced 1,720 nodes and 6,779 call-graph edges — achieving 87% edge coverage after our latest improvements.

    When we fed real debugging questions to both frontier models and a local qwen3.5:9b (8k context on an M4 MacBook Pro):

    • Without LogLoom: Full-file or full-codebase context regularly hit 30k–150k+ tokens. Several queries timed out or overflowed the context window entirely.
    • With LogLoom: Average prompt size dropped to ~626 tokens — a 99.6% reduction versus loading full source.

    In the local LLM test, full-file context caused complete failure (120s timeout, zero output). LogLoom-enriched prompts answered both complex questions (circuit breaker state machine and multi-node routing trace) correctly, leaving ~80–90% of the context window free for actual reasoning instead of context stuffing.

    On Elastro (Python), we saw consistent 95% average token reduction across seven real scenarios. On Vorsam (TypeScript), we hit 100% enrichment on 147 live Docker container logs.

    The larger and more complex the codebase, the more ridiculous the savings become. At enterprise scale (millions of source tokens), LogLoom turns what used to be an O(n) problem into a clean O(1).

    Deep Elastic Integration: Where It Really Shines

    We leaned hard into Elastic for the observability backend, and it paid off.

    LogLoom ships a clean dual-index pattern:

    • *-logs: Your enriched application logs
    • *-enrichment: The build-time code graph (nodes + call edges)

    Using Elastic enrich policies and ingest pipelines, we join these automatically at ingestion time. The result is native, queryable code provenance inside Elasticsearch.

    This unlocks queries that feel like magic compared to traditional logs:

    • Blast radius: If this function fails, what else breaks?
    • Risk heatmaps: Which module has the highest error rate this week?
    • Git audit trails: Show me errors introduced since commit abc123
    • Semantic filtering: All database-related errors outside the database module

    In practice, this turns Elastic’s AI Assistant from “sometimes helpful” into something that can actually point to exact files, functions, and call chains with high confidence. We’ve seen it reduce hallucination surface dramatically on complex RCA tasks.

    The integration is low-friction if you’re already in the Elastic ecosystem: one ingest pipeline, one enrich policy, and you’re done. For teams heavily invested in Elastic + AI features, this is currently the highest-ROI way to use LogLoom.

    The Real Superpower: Blast Radius

    The call-graph edges are where LogLoom stops being “nice” and becomes dangerous.

    Asking “If StartGateway() fails, what else breaks?” now returns 28 direct children and 58 transitive descendants in a single 33ms Elasticsearch query. No more manually tracing imports across six files while praying you didn’t miss a dynamic registration.

    We’ve gone from “I think this might affect the health checker” to “here are the exact 14 log sites that could fire if node registration fails.”

    Honest Trade-offs (Because We’re Engineers)

    It’s not magic:

    • You do need a logloom build step in CI.
    • You ship a small logloom-graph.json artifact with your container.
    • Storage overhead exists, though it’s negligible compared to the debugging time (and token costs) saved.
    • Dynamic dispatch and heavy interface usage still create some orphan nodes (we’re at 13% on Flume — better than before, but not perfect).

    Still, for most production services, the trade-off is overwhelmingly worth it.

    Why This Matters Now

    We’re in the middle of an explosion of AI-assisted debugging. Every company is throwing bigger models at their codebases. The dirty secret? Most of those models are operating with terrible context — either drowning in full source files or guessing from raw log text.

    LogLoom gives them the missing piece: deterministic code provenance attached to every log event.

    We are releasing LogLoom v0.3.1 today. Python and TypeScript are production-ready. Go is Beta and already delivering strong results on complex services. The core remains fully MIT licensed, with commercial options available for teams that need enterprise features or hosted services.

    If you’re tired of grepping your own code at odd hours, or if you’re using AI agents that regularly hallucinate where an error came from, give LogLoom a try.

    Your future self (and your models) will thank you.


    Building AI for a regulated environment? Talk to us about deploying local-first AI agents that pass compliance review.