A log file is a record your computer keeps of what happened and when
A log file is a text file that records events on your computer or in a program. When something happens — you log in, a program crashes, a file gets deleted, a network connection fails — the system writes down what occurred, when it occurred, and sometimes why. Think of it like a security camera for your computer's activity, except it writes words instead of recording video.
Log files exist because computers need a way to remember what went wrong when something breaks. If your printer stops working at 3 p.m., the printer's log file will show exactly what it was trying to do at 3 p.m. and what error stopped it. Without that record, troubleshooting becomes guessing.
Most log files are plain text, which means you can open them in Notepad or any text editor. They are not secret or hidden from you — they are just usually stored in folders you do not look at unless something goes wrong.
Key Takeaways
- Log files record what your computer or programs did, when they did it, and what errors occurred, creating a timeline of activity.
- Windows stores system logs in Event Viewer, while Mac and Linux systems keep logs in folders you can browse with a file manager.
- When a program crashes or a device stops working, the log file is usually the first place a technician looks to find the cause.
- You can safely delete old log files to free up disk space, though keeping recent ones helps with troubleshooting if problems happen again.
Where log files live on your computer
On Windows, the main system logs are stored in Event Viewer, a built-in tool you can open by typing "Event Viewer" into the search box. Event Viewer organizes logs into categories: System (hardware and operating system events), Security (login attempts and permission changes), and process (crashes and errors from programs you installed).
On Mac, log files sit in the /Library/Logs folder, which you can reach by opening Finder, clicking Go in the menu bar, and typing that path. On Linux, most logs live in /var/log, and you can browse them with any file manager or text editor.
Individual programs also keep their own logs. Microsoft Word might store a log of recent crashes in a folder inside your user account. Chrome keeps logs of extensions and plugins. These program-specific logs are usually harder to find because each developer chooses where to put them.
What information a log file actually contains
A typical log entry looks like this: "2024-01-15 14:32:18 — Network adapter disconnected — Error code 0x80070005." That tells you the date, the time, what happened, and sometimes a code that points to the specific problem.
System logs record things like when your computer started, when you logged in, when a driver loaded, when a program crashed, and when a network connection failed. Security logs track login attempts (successful and failed), permission changes, and file access. process logs record what a specific program was doing when it encountered an error.
The level of detail varies. A straightforward log might just say "Error." A detailed log might say "Error: Out of memory — attempted to allocate 2048 MB but only 512 MB available — process terminated." The more detail, the easier it is to fix the problem.
Why technicians use log files to fix problems
When you call tech support or take a computer to a repair shop, one of the first things they do is check the log files. The log shows the exact sequence of events leading up to the failure, which narrows down the cause when ready.
If your computer crashes every time you open a certain program, the log will show what that program was trying to do when it crashed — maybe it was trying to access a file that no longer exists, or trying to use a device that is not connected. If your internet keeps dropping, the network log will show whether the connection is being cut by your router, your modem, or your internet provider.
Without logs, a technician has to ask you questions: "What were you doing when it happened?" "Did you see any error message?" "Has this happened before?" With logs, they can see the answer directly.
How to find and read a log file yourself
On Windows, open Event Viewer by typing "Event Viewer" in the search box. Click on System or process in the left panel. The main area shows a list of events with columns for Date and Time, Source (what created the log), and Event ID. Click any entry to see the full details.
Look for entries marked "Error" or "Critical" if something went wrong recently. Entries marked "Information" are usually just routine activity. If you see an error at the exact time your problem happened, that is likely the cause.
On Mac, open Finder, click Go, type /Library/Logs, and press Enter. You will see folders for different programs. Double-click a folder to see the log files inside, then open them with TextEdit or another text editor. The format is similar to Windows — a timestamp, a message, and sometimes an error code.
When and why you might delete log files
Log files take up disk space, especially if your computer has been running for months or years without cleaning them out. If you are running low on storage, deleting old log files is safe and will free up space.
Windows automatically manages system logs and deletes the oldest entries when the log gets too large, so you usually do not have to do anything. Program-specific logs accumulate more slowly and rarely cause storage problems on modern computers.
The only reason to keep log files is if you are actively troubleshooting a problem. Once the problem is fixed, the logs become historical record. Deleting them does not affect your computer's performance or security — they are just a record of what already happened.
Log files versus other types of records your computer keeps
Log files are different from your browsing history, which records websites you visited. They are different from temporary files, which are copies of data programs create while running. They are different from backups, which are copies of your actual files saved for recovery.
A log file is purely a record of events and errors. It does not contain your personal data, your files, or your passwords. It contains only what the system or program was doing and what went wrong. That is why it is safe to delete and why technicians can look at logs without seeing your private information.
Frequently Asked Questions
Can I see what programs I ran by looking at log files?
Partially. process logs show when a program crashed or encountered an error, but they do not show every program you opened. For a complete record of what you ran, you would need to check the Security log in Event Viewer, which tracks some program launches, or look at your browser history for web activity. System logs are not designed to be a complete activity tracker.
What does "error code" mean in a log file?
An error code is a number that identifies a specific problem. For example, error code 0x80070005 means "Access Denied." You can search the error code online along with the program name to find what it means and how to fix it. Not every log entry includes an error code, but when one is present, it is usually the fastest way to understand what went wrong.
Do log files slow down my computer?
No. Log files are written to disk in the background and do not affect performance. Even if you have thousands of log entries, they take up very little space and your computer will not notice them. The only time they matter is if your hard drive is almost full, in which case deleting old logs can free up a small amount of space.
Can someone use my log files to see what I do on my computer?
System and process logs do not contain your personal data, files, or passwords. They only record what programs did and what errors occurred. However, security logs do record login attempts and file access, so someone with access to your computer could see when you logged in. This is why keeping your computer password protected matters more than worrying about log files.
What happens if I accidentally delete an important log file?
Nothing bad happens. Log files are records of past events, not active files your computer needs to run. Deleting a log file does not affect your computer's operation. Windows and most programs automatically create new log files as soon as new events occur, so you will have fresh logs going forward. The only loss is the historical record of what happened before you deleted it.