What is a .log file?
Log File · Data · Various · n/a
A LOG file is a plain-text diary a program keeps of what it did, usually one timestamped line per event or error. You open it in any text editor, and it is mainly there to help diagnose problems.
What is a .log file used for?
Software writes log files as it runs, appending a line whenever something notable happens: an action, a warning, an error, a startup or shutdown. It is a running history you can read after the fact.
They are the first thing to check when something breaks. Installers, servers, games and operating systems all keep logs, and the useful lines are usually the ones marked ERROR or WARN near the time the problem occurred.
Logs are plain text, so they cannot run and are safe to open or delete. They can grow large, and old ones are generally fine to remove once you no longer need to troubleshoot.
One caution: logs can contain sensitive details such as file paths, usernames or IP addresses, so glance through before sharing one for support.
What opens a .log file?
The .log format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- Notepad
- Notepad++
- VS Code
macOS
- TextEdit
- Console app
- VS Code
Linux
- Any text editor
- less / tail -f
Web
- Any online text viewer
Open a .log file step by step
- Confirm the file really is a .log. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with Notepad or Notepad++.
- On Mac, use TextEdit or Console app.
- On Linux, try Any text editor or less / tail -f.
- Still stuck? Convert the .log to Already plain text, which opens more widely.
Why can't I open my .log file?
Almost always because no installed app understands LOG. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .log at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
How to convert a .log file
You can convert a .log file to Already plain text using a conversion tool or the export menu of an app that opens it.
LOG has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.
Frequently asked questions
What is a .log file?
A LOG file is a plain-text diary a program keeps of what it did, usually one timestamped line per event or error. You open it in any text editor, and it is mainly there to help diagnose problems.
How do I open a LOG file?
Open it in any text editor, such as Notepad on Windows, TextEdit on Mac, or VS Code. To watch a log update live on Linux or Mac, use tail -f in the terminal.
Can I delete .log files?
Usually yes. Once you no longer need them for troubleshooting, log files are safe to remove. Some are locked while the program that writes them is running.
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.