Interview Prep/Docker/Resource Limits, Health & Reliability

What should applications log to when containerized?

BeginnerProductionResource Limits, Health & Reliability
Answer

Stdout/stderr, as structured JSON (timestamp, level, trace ID, service), one event per line. Not files inside the container: they need rotation, vanish with the container, and cannot be read by docker logs. For legacy apps that write files, symlink them to /dev/stdout and /dev/stderr as the official nginx image does.

All Docker questions Roadmap: Docker & containers

More on Resource Limits, Health & Reliability