Back to guides

How to Debug Production Without Logs

Production broke and you have no logs. Here's how to triage and fix the gap—and prevent it next time.

What this problem means

Production broke. A user reports an error, a request fails, or performance degrades. But you have no logs—or minimal logs that don't help. You're debugging blind.

Why this is dangerous

- Extended outages: Without logs, diagnosing issues takes hours or days.

- Silent failures: Errors may go unnoticed until they compound.

- User trust: Users lose confidence when issues take too long to fix.

Real-world example

A startup had no structured logging in production. When a user reported a payment failure, they had no way to trace the request. They spent two days reproducing the issue. With request IDs and structured logs, they could have found it in minutes.

How to fix it

1. Reproduce locally: Try to replicate the issue with the same inputs and environment.

2. Add logging now: Add temporary logging for the failing path. Deploy and wait for the next occurrence.

3. Check metrics: CPU, memory, error rates—sometimes metrics reveal the cause.

4. Request tracing: If you have request IDs, trace through the system.

5. Fix the gap: Add structured logging so this doesn't happen again.

Tools and configurations

- Structured logging: Winston, Pino, or similar. JSON with request_id.

- CloudWatch / Datadog: Centralized log storage and search.

- APM: New Relic, Datadog APM—trace requests across services.

- Error tracking: Sentry—captures errors and stack traces.

Common mistakes

- Assuming "we'll add logs later."

- Only adding logs in development.

- Not using request IDs for tracing.

- Logging sensitive data.

Quick checklist

- [ ] Reproduce locally if possible

- [ ] Add temporary logging for the failing path

- [ ] Check metrics and error rates

- [ ] Add structured logging for future debugging

- [ ] Document the logging strategy

Need help with production readiness? Get a free 30-minute audit.

Book Free 30-Min Production Audit

View our DevSecOps services

Check if your system has this risk

Take the 60-second production readiness assessment to identify gaps in your infrastructure.

Start Assessment

Frequently asked questions

How do I debug production when I have no logs?
Try to reproduce locally. Add temporary logging for the failing path. Check metrics and error rates. Add structured logging so this doesn't happen again.
What should I add for production debugging?
Structured logging with request_id, error, and timestamp. Send logs to CloudWatch or similar. Use request tracing across services.
How do I prevent debugging without logs?
Add structured logging before you need it. Use request IDs, send logs to a central store, and set up error tracking (e.g., Sentry).