What Is a LOG File?

Log files keep track of events, and can usually be opened in a text editor

What to Know

  • Log files store a record of some kind, usually in a plain text format with timestamps.
  • Any text editor can open a LOG file or convert one to another text format.

This article explains what a LOG file is, plus how to open one or convert one to a different format.

What Is a LOG File?

A file with the LOG file extension, sometimes called a logfile, is used by all kinds of software and operating systems to keep track of something that has occurred, usually complete with an event detail, date, and time. It could really be used for anything the application deems appropriate to write down.

For example, antivirus software might write information to a LOG file to describe the last scan results, like the files and folders that were checked or skipped, and which files were marked as containing malicious code.

A file backup program could make a LOG file you can open later to review a previous backup job, read through any errors that were encountered, or see where the files were backed up to.

A much simpler purpose for this format is to merely explain the newest features that were included in the most recent update of a software program. These are normally called release notes or changelogs.

How to Open a LOG File

The data contained in these files are usually regular text files. You can read a LOG file with a text editor, like Windows Notepad. For more options, check out this Best Free Text Editors list.

You might be able to open one in your web browser, too, via drag-and-drop.

How to Convert a LOG File

To change a logfile format into something like CSV, PDF, or an Excel format like XLSX, your best bet is to copy the data into a program that supports those file formats, and then save it as a new file.

For example, you could open it with a text editor and then copy all the text, paste it into a spreadsheet program like Excel or OpenOffice Calc, and then save the file to CSV or XLSX.

After you've saved it to the CSV format, use this online CSV to JSON converter if you need it to be in that format.

What a LOG File Looks Like

A program called EaseUS Todo Backup created the LOG file you see below. It includes the EXE file location and the exact time that each message was written.

C:\Program Files (x86)\EaseUS\Todo Backup\Agent.exe
2021-05-10 17:35:16 [M:00,T/P:1940/6300] Init Log
2021-05-10 17:35:16 [M:29,T/P:1940/6300] Ldq : Agent start install!
2021-05-10 17:35:16 [M:29,T/P:1940/6300] Ldq : Agent call CreateService!
2021-05-10 17:35:16 [M:29,T/P:1940/6300] Ldq : Agent call CreateService is success!

Windows created this one, called setupact.log:

2023-08-24 15:05:48, Info    LogSession: Starting a new log session at [E:\$SysReset\Logs]
2023-08-24 15:05:48, Info    Session: Checking main OS for a test ID
2023-08-24 15:05:48, Info    Telemetry: Checking [E:] for a test ID
2023-08-24 15:05:48, Info    Registry: Loading SOFTWARE hive from offline OS E:\Windows
2023-08-24 15:05:48, Info    Registry: Loading offline registry hive from [E:\Windows\System32\config\SOFTWARE]
2023-08-24 15:05:48, Info    Telemetry: No test ID present

Some might not be so nicely structured, though, and could be hard to read, like this one created by Slack:

[10/18/22, 11:19:54:324] info: Breadcrumb: electron: app.browser-window-focus 
[10/18/22, 11:19:54:324] info: Breadcrumb: electron: app.browser-window-focus 
[10/18/22, 11:19:54:324] info: Store: SET_WINDOW_FRAME 
{
  "id": 1,
  "frame": {
    "isFocused": true
  },
  "fromEvent": true
}
[10/18/22, 11:19:54:324] info: Store: SET_WINDOW_FRAME 

Others might even appear to be complete gibberish, since there aren't any timestamps. In cases like this one, the log is written to a file with the .LOG file extension but doesn't adhere to the standard that most of these files abide by:

COPY main/python/prj/build.lst wntmsci12.pro/inc/python/build.lst
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/abc.py wntmsci12.pro/lib/python/abc.py
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/abc.pyc wntmsci12.pro/lib/python/abc.pyc
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/aifc.py wntmsci12.pro/lib/python/aifc.py
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/antigravity.py wntmsci12.pro/lib/python/antigravity.py

More Information on LOG Files

LOG files can exist in all kinds of sizes. A few on my computer are over 60 MB, but most are under 10 KB and include just a couple lines of text.

You can build your own LOG file in Windows using the built-in Notepad application, and it doesn't even need to have this file extension. Just type .LOG in the very first line and then save it as a regular TXT file.

Each time you open it, the current date and time will be appended to the end of the file. You can add text under each line so that when it's closed, saved, and then reopened, the message remains and the next current date and time is available.

You can see how this simple example begins to look like the much fuller LOG files shown above:

.LOG
10:15 AM 9/12/2023
I can type here
10:15 AM 9/12/2023

Still Can't Open It?

If you get a permissions error or are told that you can't view the LOG file, chances are it's either still being used by the program and won't open until it's released, or that it was created temporarily and has already been deleted since the time you tried opening it.

It might instead be the case that the LOG file is stored in a folder that you don't have permissions to.

At this point, if your file still doesn't open like you think it should, double-check that you're reading the extension correctly. It should read ".LOG" but not .LOG1 or .LOG2.

Those latter two file extensions are associated with the Windows Registry as Hive Log files, and as such are stored in binary and unreadable with a text editor. They are located in the config subfolder of the System32 folder.

LGO is another example of a file extension that looks like LOG. That's used for program code relevant in the Logo software.

Was this page helpful?