Logging records timestamped events across applications, operating systems, network devices, and cloud services.
Why It Matters
| Type | Contents | Common Locations |
|---|---|---|
| Application | Errors, transactions, user actions | Windows: C:\\ProgramData\\<App>\\logs Linux: /var/log/<app>.log |
| System | Driver loads, service start/stops, kernel | Windows Event Viewer → System Linux: /var/log/syslog |
| Security | Authentication, authorization, policy changes | Windows Event Viewer → Security Linux: /var/log/auth.log |
| Network | Firewall, router, switch traffic | /var/log/ufw.log, device archives |
| Audit | File/process/registry monitoring | Linux: /var/log/audit/audit.log Windows: Sysmon/Operational |
| Web | HTTP/S access, errors, proxy, API logs | Apache: /var/log/apache2/access.log Nginx: /var/log/nginx/access.log |
Every structured log entry includes these core fields:
2025‑08‑05T10:23:47.128Z)host=Omar.local)DEBUG, INFO, WARN, ERROR, CRITICALcomponent=nginx){"user":"alice","action":"login","status":"failed"})Example
2025-08-05T10:23:47.128Z host=Omar.local level=ERROR component=payment-processor message={"txn_id":"12345","error":"timeout"}