Logging

Definition

Recording events and activities in your application for debugging and monitoring, essential for maintaining system health and performance.

Use Cases

Provider Equivalents

Frequently Asked Questions

What's the difference between logging and monitoring?
Logging records detailed event data (for example, an error stack trace or a user login event). Monitoring focuses on measuring and alerting on system health signals (like CPU usage, latency, or error rate). In practice, monitoring often uses metrics and alerts, while logs provide the detailed evidence you search during troubleshooting.
When should I use logging?
Use logging whenever you need to troubleshoot issues, understand application behavior, audit important actions, or support incident response. It’s especially important for production systems, distributed/microservice architectures, and any application where you need to trace requests, investigate errors, or meet compliance and security requirements.
How much does logging cost?
Logging costs usually depend on (1) how much log data you ingest, (2) how long you retain it, (3) how often you query/analyze it, and (4) any data export or archival storage. Costs can grow quickly with high-volume debug logs, verbose request logs, or long retention periods, so common cost controls include sampling, log level tuning, retention policies, and routing older logs to cheaper storage.

Category: monitoring

Difficulty: basic

Related Terms

See Also