A log file is a file which is generated by a software process to record some specific details (events) about the workings of this process. Most logfiles are plain, human-readable text files, some however are using a binary format to conserve space and need specific treatment for post-processing. (Example: Unix login history in
A log file can be categorized into several types:
- Access log which records information related to the usage of the service provided by this process.
- Error log which records error conditions.
- Info/Debug log which records more detailed information as compared with other logs.
- Transaction log to document a chain of events, this often is required to be immutable to avoid later tampering.
redo logs, containing the complete information to replay a chain of actions, often used where incomplete data transactions would lead to inconsistent data, for example in file systems or databases.
The main two goals of creating and maintaining log files are:
- Finding and debugging problems.
- Gathering usage information.
Depending on the frequence of events and the level of detail, logfiles may be growing very quickly, and usually require a strategy for managing their growth.
Depending on special reqirements, log-files may go to specialized devices to meet criteria of speed or immutability.