Open to everyone Reading, lesson 68 of 100, 2 min read
Logs
Logs are the memory of a system
A log is a record of events: who signed in, what failed, which page was requested, which rule blocked a connection. Without logs, an organisation cannot tell whether it was attacked, how, or what was taken.
What to log
| Source | Useful events |
|---|---|
| Authentication | Successful and failed sign-ins, MFA changes, password resets, account lockouts |
| Administration | New accounts, role changes, permission changes, configuration changes |
| Applications | Errors, sensitive actions (payments, grade changes, exports) |
| Web servers | Requests: time, address, method, path, status, user agent |
| Firewalls and networks | Allowed and blocked connections, VPN sessions |
| Endpoints | Malware alerts, new programs installed, USB devices connected |
| Cloud | Console sign-ins, changes to storage, IAM and networking |
What not to log
Never log passwords, full card numbers, one-time codes, session cookies or private keys. Logs are copied, shared and kept for a long time, so treat them as confidential and avoid unnecessary personal data in them.
Good log habits
- Accurate time on every system (synchronised with NTP), or events cannot be matched up.
- Central collection: send logs to a separate server or service, so an attacker on one machine cannot erase the evidence.
- Retention: keep logs long enough to investigate. Many attacks are discovered weeks or months after they start.
- Integrity: protect logs against change; restrict who can delete them.
- Someone reads them, helped by alerts. Logs nobody reads only help after the damage is done.
Reading a log line
A typical web server line:
203.0.113.45 - - [02/Nov/2026:10:14:03 +0100] "POST /login HTTP/1.1" 401 512 "-" "Mozilla/5.0"From left to right: the client address, the time, the request (method, path, protocol), the status code (401: sign-in failed), the size of the response, the referring page and the browser. Hundreds of these from one address in a minute look like password guessing.
Note
On this platform, school leaders can see an Activity page built from the platform's own audit log.