Deciding which security logs to keep
Every device and service produces logs, and keeping all of them forever is neither practical nor necessary. This guide helps you decide which logs matter, how long to keep them and where to store them safely.

What logs are for
A log is a record of events: a sign-in, a file opened, a firewall rule triggered, a program installed. Logs serve three purposes for a small or mid-sized organization. They help detect attacks while they are happening, they help investigate what happened after an incident and they provide evidence for insurers, auditors, regulators and sometimes courts.
Each purpose has different needs. Detection needs logs collected quickly and watched. Investigation needs logs kept long enough to reach back to the start of an incident. Evidence needs logs that have not been tampered with. Keep those three goals in mind when deciding what to collect.
The logs that matter most
You do not need every log from every device. Focus on the sources that show who accessed what and how attackers usually get in. For most small organizations those are identity and email logs, endpoint security alerts, firewall and VPN logs and server logs. Collecting these well is more valuable than collecting everything poorly.
Specialized systems may add to the list. A clinic's electronic medical record system, an accounting platform or a building access control system can all hold logs that matter to an investigation. Find out what each one records and how long it keeps it.
- Cloud sign-in and audit logs from Microsoft 365 or Google Workspace
- Endpoint protection and EDR alerts
- Firewall, VPN and remote access logs
- Windows server security event logs
- Logs from line-of-business systems holding sensitive data
How long to keep them
There is no single right retention period. Many security frameworks suggest keeping security logs for at least 90 days of easily searchable history, and longer for archive. Many organizations choose around a year so they can look back far enough when a compromise is discovered late. Industry rules, contracts or insurance requirements may set longer periods, so check those.
Balance retention against privacy. Logs can contain personal information about staff and clients, and Alberta's privacy laws expect organizations to keep personal information only as long as reasonably needed. Set a retention period with a clear reason, write it down and apply it consistently. If you are unsure what your obligations are, ask your lawyer or privacy advisor.
Where to store them
Logs stored only on the device that produced them have two weaknesses. They are lost if the device fails, and they can be deleted by an attacker who takes control of that device. Clearing logs is a common step in many attacks. Sending logs to a separate central system protects them and makes searching across sources much easier.
That central system might be a cloud log service, a security information and event management platform run by a provider, or a simpler log collector for a small office. Protect access to it carefully, since it holds a detailed picture of your organization's activity. Make sure clocks on all devices are synchronized, so events from different sources line up correctly.
Someone has to look
Collected logs that nobody reviews are useful only after something has gone wrong. To get detection value, someone must watch for warning signs: sign-ins from unusual places, repeated failed attempts, new admin accounts, security tools being disabled. For most small organizations this is best handled by a managed detection service or an IT provider with security monitoring, since staff rarely have time.
At a minimum, set up alerts for a short list of high-risk events and decide who responds. Review the alerts and the logging setup once a year, and after any incident, to confirm the right information was available.
Test your logs before you need them
A simple exercise tells you a lot. Pick a date a few months ago and try to answer a question such as: who signed in to the finance mailbox that week, and from where? If you cannot answer it within an hour, your logs are either not being kept, not reachable or not searchable enough.
Include log questions in tabletop exercises as well. Walking through a pretend incident often reveals that a key log was never turned on or that only one person knows how to search it.
- Focus on identity, email, endpoint, firewall and server logs first.
- Choose a retention period with a clear reason, often around a year.
- Store logs centrally away from the devices that produce them, and watch them.