What Is an LOG File?

How to Open, Edit, and Convert LOG Files

LOG Files
LOG Files.

A file with the LOG file extension is a Log Data file (sometimes called a logfile) 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 that the application deems appropriate to write down.

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

A file backup program could use an LOG file too, which could be opened 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 some LOG files is to merely explain the newest features that were included in the most recent update of a piece of software. These are normally called release notes or changelogs.

How to Open an LOG File

Like you can see in the examples below, the data contained in these files are plain text, which means they're just regular text files. You can read an LOG file with any text editor, like Notepad++ or Windows Notepad.

You might be able to open an LOG file in your web browser too. Just drag it directly into the browser window or use the Ctrl-O keyboard shortcut to open a dialog box to browse for the LOG file.

How to Convert an LOG File

If you want your LOG file to be in a different file format 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 the LOG file with Notepad and then copy all of the text, paste it into a spreadsheet program like Microsoft Excel or OpenOffice Calc, and then save the file to CSV, XLSX, etc.

Converting LOG to JSON can be accomplished after you've saved it to the CSV format. Once you've done that, use this online CSV to JSON converter.

What an LOG File Looks Like

This LOG file, created by EaseUS Todo Backup, is what most LOG files look like:

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

As you can see, there's a message that the program wrote to the LOG file, and it includes the EXE file location and the exact time that each message was written.

Some might not be so nicely structured, though, and could be hard to read, like this LOG file created by a video converter tool:

[1236] 06-26 09:06:25 DEBUG [INPUT]to parse input: merge=fn:mix=sts:0:1\,fn:picture=dur:3000\,fr:29970:1000\,fn:normal=raw:ffmpeg\,sts:0\,crop:0:0:1920:1080:1920:1080:1920:1080:1\,fn:ufile:C:/Users/Jon/AppData/Local/VideoSolo Studio/VideoSolo Free Video Converter/template/img_0.png\,fn:pad=pa:8:63:48000,fn:normal=raw:ffmpeg\,sts:0:1\,probep:5000000:20000000\,crop:0:0:1280:720:1920:1080:1920:1080:1\,rotate:0:0:0\,effect:0:0:0:0:0\,aeffect:256\,fn:ufile:C:/Users/Jon/Desktop/SampleVideo_1280x720_2mb.mp4,fn:mix=sts:0:1\,fn:picture=dur:3000\,fr:29970:1000\,fn:normal=raw:ffmpeg\,sts:0\,crop:0:0:1920:1080:1920:1080:1920:1080:1\,fn:ufile:C:/Users/Jon/AppData/Local/VideoSolo Studio/VideoSolo Free Video Converter/template/img_1.png\,fn:pad=pa:8:63:48000 [1236] 06-26 09:06:25 DEBUG [INPUT:normal]Ready to open file: ufile:C:/Users/Jon/AppData/Local/VideoSolo Studio/VideoSolo Free Video Converter/template/img_0.png
[1236] 06-26 09:06:25 DEBUG [OPEN]FfMediaInput start open

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 LOG 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
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/anydbm.py wntmsci12.pro/lib/python/anydbm.py
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/argparse.py wntmsci12.pro/lib/python/argparse.py
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/ast.py wntmsci12.pro/lib/python/ast.py
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/asynchat.py wntmsci12.pro/lib/python/asynchat.py
COPY main/python/wntmsci12.pro/misc/build/Python-2.7.6/Lib/asyncore.py wntmsci12.pro/lib/python/asyncore.py

More Information on LOG Files

You can build your own LOG file in Windows using the built-in Notepad application, and it doesn't even need to have the .LOG 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

8:54 AM 7/19/2017
test message 

4:17 PM 7/21/2017

With Command Prompt, you can also make an LOG file automatically through the command line while installing an MSI file.

Still Can't Open Your File?

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 your'e reading the file 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 should be located in the %systemroot%\System32\config\ folder.