Skip to main content
Lexicon
Lexicon
Logging

Logging

Difficulty: Introductory
4 min read
Updated 2026-08-29

In plain English

Plain definition

Logging is the practice of writing down what a system did, and when, so someone can look back later and work out what happened. Each entry, or log line, typically records a timestamp, a source, a severity level and a message describing an event.

How log records are written and stored

Each event record emitted by software, infrastructure or network components, structured or unstructured, is written to a durable sink (file, stream, or log management platform) for later retrieval, correlation and analysis. A log entry generally includes a timestamp, a severity or level field (for example debug, info, warning, error, critical), a source identifier (host, process, service or container), and a message body that may be free text or structured (JSON, key-value pairs). Logging is distinct from metrics, which aggregate numeric measurements over time, and from tracing, which follows a single request across service boundaries. Together the three form the commonly cited pillars of observability.

What operations teams use logs for

Logging is the primary evidence trail used during incident response, root-cause analysis and compliance auditing. Operations teams rely on logs to reconstruct the sequence of events preceding a failure, to confirm whether a change had the intended effect, and to detect anomalous behaviour such as repeated authentication failures or unexpected process terminations. Logs are only useful in operations when entries are consistently timestamped, correctly timezone-aware, retained for an appropriate period, and searchable at the volume the organisation actually produces. Log volume and retention cost are material operational constraints, not incidental details.

How logs travel from a host to a search index

Logging usually sits alongside metrics and tracing within an observability stack. Applications and infrastructure components emit log events locally, which are then collected by an agent or forwarder, transported to a centralised aggregation or indexing layer, and made queryable through a search or visualisation interface. In distributed systems, correlation identifiers are commonly propagated through logs so that events from multiple services relating to a single request can be reassembled. Choices about logging architecture, such as structured versus unstructured formats, centralised versus local retention, and synchronous versus asynchronous shipping, directly affect diagnostic speed and system overhead during high-load or failure conditions.

Following one failed request through the logs

A web service logs an entry each time a request fails with a server error. The entry records the timestamp, the request path, the response code, and an internal trace identifier. During an incident, an engineer searches the centralised log index for that trace identifier to see every log line emitted across the services the request touched, reconstructing the failure path without needing to reproduce the issue.

Logs are not monitoring

Logging is not the same thing as monitoring or metrics. Logging records discrete events after they occur. It does not, by itself, alert on thresholds or aggregate trends over time. Verbose logging is also sometimes assumed to be free of cost or risk, but excessive or unstructured logging can degrade performance, increase storage and query cost, and inadvertently capture sensitive data if fields are not deliberately filtered.

  • Observability
  • Metrics
  • Distributed tracing
  • Log aggregation
  • Structured logging

Further Reading and Next Steps

If you are implementing or evaluating a logging workflow, confirm, against current platform documentation, the specific retention policy, structured-format support, and access controls available in their deployment before treating any configuration as production-ready. Validate log ingestion in a non-production environment first, and confirm that sensitive fields are excluded or masked before enabling any new log source in production.

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

More from KBY that goes with this term.