← Back to microservices patterns maplogs
🪵
Microservices Pattern
Centralized Logging
Aggregate structured logs from all services into one searchable place.
Detailed Description
Centralized logs turn scattered service output into a debugging system.
Use structured JSON logs and avoid logging secrets or sensitive payloads.
Visual Diagram
Service logs -> collector -> central store Search by traceId, userId, error
Tradeoffs
Pros
Single search surface, cross-service correlation
Cons
Cost and PII risk at scale
Examples: ELK, Loki + Grafana, Datadog logs, CloudWatch