PC.net
HomeHome : Help Center : Question
ShareShare

What is the difference between a .LOG file and a .TXT file?

Answer: Files with ".log" and ".txt" extensions are both plain text files. This means they can both be viewed with a standard text editor like Notepad for Windows or TextEdit for Mac OS X.

The difference between the two file types is that .LOG files are typically generated automatically, while .TXT files are created by the user. For example, when a software installer is run, it may create a log file that contains a log of files that were installed. Log files typically have one entry per line, which includes information such as the filename, the action (created, moved, deleted, etc.), and the location of the file.

Standard text files, on the other hand, are typically created in a word processor by a user. For example, if you create a new file with Notepad, it saves the file with a ".txt" extension. Similarly if a Mac user creates a plain text file with TextEdit, the file is saved with a ".txt" extension.

Since log files are a type of text file, they may be considered a subset of text files. The ".log" extension simply specifies that the text file contains a log of data. In fact, you can usually change the extension from ".log" to ".txt" or vice-versa, and most text editors will still open the file. Of course, since the extension provides information about the file type, it's best to not modify it.

Published: April 27, 2009 — by Per Christensson

Answer from the PC Help Center
https://pc.net/helpcenter/log_files_vs_txt_files
space