Structured Logging
Logs that AI can actually search. Ask questions in plain English, get answers in seconds.
Before
You
Why did the payment fail for user 12345 yesterday?
Claude
I don't have access to your logs.
Could you search your logging system for entries related to user 12345 and share what you find?
I'd need to see the request logs, payment gateway responses, and any error messages.
You
*Opens Datadog, writes complex query, scrolls through thousands of lines...*
After
You
Why did the payment fail for user 12345 yesterday?
Claude
Let me search the logs for that user...
Using recall.query_logs
recall.query_logs("payment failed user:12345 yesterday")
Found 3 relevant entries
14:23:01 PaymentController#create started for user 12345
14:23:02 Stripe API call: card_declined, insufficient_funds
14:23:02 Payment failed, notifying user via email
Found it. The payment failed because Stripe returned card_declined with reason insufficient_funds.
The user was notified via email at 14:23. This wasn't a bug—their card simply didn't have enough funds.
Query time: 1.2 seconds
Without Recall
With Recall
Use Rails.logger as usual. Recall captures and structures everything.
Structured JSON, indexed, and ready for natural language queries.
Claude queries in plain English. Recall translates to the right search.
Relevant logs, summarized and contextualized.
Available via MCP (Model Context Protocol)
recall.query_logs()
"Search logs in plain English"
recall.get_request_trace(id)
"Show all logs for this request"
recall.get_patterns()
"Find recurring log patterns"
recall.summarize()
"Summarize logs for this period"
Works with Rails.logger out of the box.
# Add to your Gemfile
gem 'brainzlab'
# That's it. Your logs are now searchable by AI.
# No changes to your logging code needed.