NEW
Recording time-stamped events and messages from applications and systems for debugging, monitoring, and compliance.
DESCRIPTION
Logging captures discrete events and diagnostic context from software and infrastructure. Structured logs enable reliable parsing, search, and correlation across distributed systems. Centralized log aggregation supports alerting, incident response, audits, and forensics. Good practices include consistent schemas, severity levels, sampling, redaction of sensitive data, and rotation policies. Logs complement metrics and traces as pillars of observability.
ALTERNATIVE DEFINITIONS
Wikipedia
In computing, logging is the act of keeping a log of events that occur in a software system.
Simple, general definition of software logging.
Python Documentation
The logging module defines functions and classes which implement a flexible event logging system for applications and libraries.
Describes a flexible logging framework from a major language ecosystem.
AWS
Logs are time-stamped records of discrete events that provide detailed context about what happened in a system.
Emphasizes discrete events and detailed contextual information.
RELATED TERMS
Measure OpenTelemetry Syslog Structured Logging Log Aggregation SIEM Audit Logging Log Rotation
COMPETING TERMS
RELATIONS
- Narrower: Audit Logging Write-Ahead Logging
KNOWLEDGE AREAS
Observability & Telemetry Software Engineering Platform & Tooling Data Security
TARGET AUDIENCE
Software Developer DevOps Engineer MLOps Engineer Data Engineer Application Administrator
EXTERNAL SOURCES
- Wikipedia - Logging (software)
- Python - Standard logging framework docs
- AWS - Observability best practices overview
- Microsoft - Azure Monitor logs guidance
TOP QUESTIONS
Why is Logging essential for observability?
Logs capture fine-grained events and context that metrics can’t, aiding debugging, audits, and incident investigations.
Category: Relevancy
What is structured Logging?
Emitting logs in a consistent schema (e.g., JSON) for easier parsing, querying, and correlation across services.
Category: Technique
How do logs relate to metrics and traces?
They complement each other: metrics summarize state, traces follow requests, logs record detailed events.
Category: Concept
What are common Logging mistakes?
Overly verbose logs, missing context, inconsistent schemas, and logging sensitive data cause costs, noise, and risk.
Category: Mistakes
How to secure logs?
Redact secrets, apply access controls, encrypt at rest/in transit, and enforce retention and deletion policies.
Category: Data Security
How to reduce Logging costs?
Adopt sampling, severity thresholds, log routing and tiering, and archive cold logs cost-effectively.
Category: Management
What is log correlation?
Linking related logs via request IDs or trace IDs to reconstruct execution paths across systems.
Category: Technique
When to log at error vs. warn vs. info?
Use error for failures requiring action, warn for potential issues, and info for routine events and state changes.
Category: Best practices
What is log rotation?
Policy to roll files by size/time, preventing disk exhaustion and enabling retention and archival strategies.
Category: Operations