Interview Prep/Monitoring & Observability/Logging: ELK/EFK, Loki & Log Shippers

What are structured logs and why are they better?

BeginnerConceptLogging: ELK/EFK, Loki & Log Shippers
Answer

Structured logs are machine-parseable records, usually JSON, with consistent fields, instead of free text:

{"ts":"2026-11-09T10:15:02.123Z","level":"error","service":"checkout","trace_id":"4bf92f35...","user_tier":"gold","msg":"payment declined","provider":"stripe","duration_ms":812}

You can filter and aggregate by any field without fragile regexes, correlate with traces through trace_id, and avoid multiline parsing problems. Pick a schema (ECS or OTel semantic conventions) and enforce it in the logging library.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: ELK/EFK, Loki & Log Shippers