What is Logging?
Recording timestamped events from applications and infrastructure to support debugging, auditing, and operational analysis.
Definition
Logging captures discrete events — a request handled, an exception thrown, a login attempt — as timestamped records. Modern practice favors structured logs (JSON with fields like level, trace_id, and user_id) over free-form strings, because structure makes logs queryable. Applications write to stdout, and collectors such as Fluent Bit, Vector, or Logstash ship entries to a central store like Elasticsearch, Loki, or CloudWatch. Log levels (DEBUG through ERROR) control verbosity, while sampling and retention policies keep costs bounded. Correlating logs with trace IDs turns isolated lines into full request narratives.

