Reading logs for testers
Use logs as recorded evidence: correlate a request, inspect context and count records without assuming the first error proves the cause.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a ship's logbook. On a ship, the crew writes down what happens and when. If the ship goes off course, the captain reads the entries before the trouble. The entries tell the story.
Daily List is a to-do list app. Lily says her reminder email never came. Tom, the tester, cannot see inside the app. He opens its log, the diary the program writes as it works.
He searches for the time of the reminder. He finds a line that says the job started. The next line says the mail service did not answer. That is a clue about the caller’s timeout, not proof that the mail service did nothing or caused the problem. Tom gathers context for Leo, the developer.
The picture has a limit. A captain writes what matters. A program writes what a developer chose to write, so some events are missing. Also, a busy app writes thousands of lines a minute.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PLAIN WORDS · 1 in this section
- logbook
- a book where a captain writes down each day's events
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Use selected recorded events to investigate a failure, correlate context and distinguish observations from a verified cause.
- Find the time
- First error
- Lines before
- Hand over
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| A ship's logbook | The log file |
| One entry with a time | A log entry |
| A note that says storm or calm | The log level |
| A tag on every page of one voyage | The request identifier (ID) |
WHERE THIS PICTURE STOPS
- A captain writes what matters, but a program writes what a developer chose.
- A logbook has a few pages a day, but a busy app writes thousands of lines a minute.
- A crew checks the logbook by hand, but testers search it with tools.
HOOK
First error, then the lines before.
REMEMBER IT THIS WAY
A story beat: one picture-line that carries the order or the cause.
Lily’s reminder email was reported missing, so Tom searched the recorded reminder context and found a caller timeout that still needed investigation.
| In the trick | What it stands for |
|---|---|
| Reminder time | Tom searches for the time of the reminder |
| No answer | The caller recorded a timeout, not the provider’s final outcome. |
A program writes what a developer chose, so the cause may not be logged.
TELL A FRIEND
A ship’s logbook gives clues about a voyage, but missing pages or differing clocks can leave an incomplete story.
OFTEN MIXED UP WITH Microservices basics for testers. Microservices basics shows why one tap crosses many services. This lesson shows how to follow that tap in the logs.
PRACTISE AND KEEP
Sources for this topic — 14 sources
- Market practice
Guide to Computer Security Log Management (NIST SP 800-92) ↗ — National Institute of Standards and Technology · Log management: a log is a record of events in a system, and logs need planning for what is kept and for how long (search excerpt, page not opened)
A Revision 1 draft was issued in October 2023; NIST pages seen as excerpts still list it as a draft. Seen as WebSearch excerpts on the access date; the page was not opened.
- Market practice
Logging HOWTO (Python documentation) ↗ — Python Software Foundation · Levels in increasing severity are DEBUG, INFO, WARNING, ERROR and CRITICAL, and the default threshold is WARNING (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Logging Cheat Sheet (OWASP) ↗ — Open Worldwide Application Security Project · Log for a purpose, not too much or too little, and keep secrets such as passwords and tokens out of logs (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
V34 review, 6 November 2026: Actual introduction/purpose, data-exclusion and verification sections read; redact/minimise secrets, review access and retention and test logging failures.
V34 review, 6 November 2026: Actual introduction/purpose, data-exclusion and verification sections read. Test event classification/access/injection/failure handling and minimise credentials/personal data.
- Market practice
tail(1): output the last part of files (GNU coreutils man page) ↗ — GNU Project · tail -f prints data appended to a file as it grows, and tail -F follows the file by name across log rotation (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
grep, searching for a pattern (GNU grep 2.4 manual) ↗ — GNU Project · grep prints the lines of its input that match a pattern; -c counts matching lines and -v selects the lines that do not match (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: grep 2.4, an old edition. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Logging Cheat Sheet (OWASP) ↗ — Open Worldwide Application Security Project · Logging Cheat Sheet, actual Introduction/Purpose/Event data sources and complete event attributes/Data to exclude/Customizable logging/Event collection/Verification; Protection/Disposal also read 7 November 2026: partial/untrusted evidence, event-vs-log time, safe malformed-field handling, access and secret minimisation.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
V34 review, 6 November 2026: Actual introduction/purpose, data-exclusion and verification sections read; redact/minimise secrets, review access and retention and test logging failures.
V34 review, 6 November 2026: Actual introduction/purpose, data-exclusion and verification sections read. Test event classification/access/injection/failure handling and minimise credentials/personal data.
- Market practice
Logging HOWTO (Python documentation) ↗ — Python Software Foundation · Complete Basic Logging Tutorial read 7 November 2026, displayed Python 3.15.2: assigned severity, default WARNING configuration and logger/handler/filter distinctions. Actual fixture uses installed Python 3.12.14, not the online runtime.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
GNU Grep manual (GNU Project) ↗ — GNU Project · Actual installed GNU grep 3.11 full --help/--version read 7 November 2026: -c counts selected physical lines; fixed/basic/extended/Perl patterns differ. Current online3.12manual openings timed out; no fresh full-manual claim.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
tail invocation (Coreutils manual) ↗ — GNU Project · Actual installed GNU coreutils tail 9.7 full --help/--version read 7 November 2026: default -f follows descriptor, -F is --follow=name --retry. Online manual opening timed out; flags on other implementations must be checked.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
View container logs: captured output and driver limitations ↗ — Docker · Complete View container logs guide opened 7 November 2026: stdout/stderr, file-routing and driver/dual-logging caveats; CLI reference also read, no actual daemon execution.
Complete current rendered guide opened and read 7 November 2026, operative22–35 plus footer. CLI reference also read in full. No Docker daemon/container execution or installed-version conformance claimed. Original images not reused.
- Market practice
less: follow mode in installed command help ↗ — Mark Nudelman / less project · Installed less 668 version and Summary/Moving help section read 7 November 2026; F is forward forever. Other options output truncated; no full-help or website-release claim.
Actual local less 668 version and help Summary/Moving section read 7 November 2026. Other help options were truncated and are not claimed fully read; website homepage was not opened. Project URL is identified by actual version output. No current website release or interactive remote application behavior certification.
- Market practice
NIST Log Management publications: final and draft status ↗ — National Institute of Standards and Technology · Actual NIST publications catalogue lines 64–77 and update line 127 and Revision 1 initial-public-draft metadata, lines 64–105 opened 7 November 2026: 2006 Final and 2023 Draft. Status only, not a full-PDF or finalized Revision 1 claim.
Actual official catalogue lines 64–77 and update line 127 and exact Revision 1 initial-public-draft page lines 64–105 opened/read 7 November 2026. Revision 1 initial-public-draft comment period closed; no claim it is final. Final detail-page open timed out; neither PDF newly read. Preserve prior canonical 2006 source and historical incomplete-read notes.
- Market practice
Common Format and Multipurpose Internet Mail Extensions (MIME) Type for Comma-Separated Values (CSV) Files (Request for Comments 4180) ↗ — IETF · RFC 4180, October 2005, Informational, complete sections 1–3 and 5 and current RFC Editor status/update metadata read 7 November 2026: CSV quoted commas, line breaks and doubled quotes; RFC 7111 update noted, its clauses not newly read.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments (RFC) 4180, October 2005. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Site Reliability Engineering: Service Level Objectives ↗ — Google · Objectives/Agreements, complete lines 70–91 read 7 November 2026: an SLA has consequences which may be financial or other forms; historical Google service examples not current commitments.
A practice description from one company; the text was seen only as search excerpts. Seen as WebSearch excerpts on the access date; the page was not opened.
8 November 2026: primary Chapter 4 Indicators, Objectives and Agreements opened; defined measurement/window, targets and consequences that may be nonfinancial. Historical examples are not current product SLAs.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.