Logging

Automation

// Definition

The practice of recording timestamped events emitted by a running application — errors, warnings, informational messages, and debug traces — to a persistent or queryable store. Logs are one of the three pillars of observability, alongside metrics and traces. A well-structured log entry carries at minimum a timestamp, a severity level (ERROR, WARN, INFO, DEBUG), a message, and a correlation ID linking it to its originating request. In QA, logs are the primary post-hoc evidence for what happened during a test run: a failing end-to-end test rarely tells you which backend call failed — the logs do. Structured logging (JSON lines rather than free-form text) makes logs programmatically queryable without regex parsing. Common testing concerns include verifying that the correct log level is used (a caught exception should be WARN or ERROR, not INFO), that no PII appears in plain text, that correlation IDs are propagated to every service hop, and that security-relevant events (failed login, privilege escalation attempt) are logged at the right level with enough context to reconstruct the event.

// Related terms