A log file is a record of communication between a computer's operating system and an application or other piece of software. The role of a log file is to capture any state changes or events that would be valuable to the owner. Log files are stored for debugging, server administration, fraud prevention and compliance.