Chapter 14: Logging and Light Observability
Chala mitrano, aaj aapan logging — server sathi flight recorder. Request fail zali ki replay. Containers madhe stdout/stderr aani docker logs, central searchable logs, journald/logrotate, aani primary path: CloudWatch Logs (AWS link). ELK cha short mention. Correlation IDs ek paragraph. Secrets log madhe — kadhi nahi. Ghabru naka: generate → query last error → 5-line incident note.
What you will learn in this chapter
- Container stdout/stderr and docker logs
- Why central searchable logs matter
- journald and logrotate basics
- CloudWatch Logs as the primary path
- Correlation IDs and a short incident note
Concepts in this chapter
- 14.1Why logs — flight recorder for the server
- 14.2stdout/stderr and docker logs
- 14.3Local OS logs — journald and files
- 14.4Primary path — CloudWatch Logs
- 14.5Log groups, streams and agents (conceptual)
- 14.6Searching — find the last error
- 14.7Correlation IDs — one paragraph that saves hours
- 14.8Light observability vocabulary
- 14.9Security and hygiene
- 14.10Anti-patterns
- 14.11Troubleshooting table
- 14.12Lab — generate, query, write the note
Review and practice
- ★14.11b Retention, cost awareness and lab hygiene
- ★14.11c From red metric to log line (glue with Chapter 13)
- ★14.11d Structured logging mini-example
The chapter recap is at the end of the last concept page.