A log file contains the automatically maintained log of all or certain actions of processes on a computer system.
Important applications can be found above all in process control and automation. In principle, all actions that are or could be necessary for a later investigation (audit) are recorded. The flight recorder in airplanes is an example of continuous logging, but it is rarely evaluated, for example after an accident.
In the area of databases, there is a transaction log in which changes to the database of correctly completed transactions (completed by commit) are recorded in order to be able to restore the current data stock in the event of an error (e.g. system crash).
On a PC, log files of certain actions can be written by one or more users on a computer without them noticing or affecting their work. The system logbook (on Linux usually in /var/log/messages, but Windows NT and its successors also write corresponding entries in one or more event logs) is essential for this, if they are configured accordingly. Among other things, it can log logins to the system, as well as other important information. In addition to the operating system itself, background programs (e.g. an e-mail server, a proxy server, etc.) usually write to log files in order to keep action messages, error messages and notices persistently (permanently) or temporarily available. The same applies to installers, firewalls, virus scanners, and the like. Ideally, log files are stored on a separate drive from the application so as not to limit the application’s I/O resources. Log files are also created by web servers but can also be used outside the Internet to investigate the usability of programs, general user behavior, or troubleshooting a system. The log file is examined during log file analysis.
---

Log Levels
In principle, a log line in a log file usually contains an event as well as the corresponding date and time as a time stamp. The time is usually preceded by the time, as a log file is a chronological list.
If you can’t retrieve log files on a server with your own web presence, then various web services which allow you to set a small counter on your own web presence. This counter is loaded again and again when the page is retrieved from the provider server, where an evaluation of the accesses is then created using the access log file in the form of tables and graphs. Web beacons and HTTP cookies can be used to store unique serial numbers, whereby the latter enable website operators to keep log files about individual accessing computers over a longer period of time by storing unique serial numbers.
Since logging all program events would consume the resources available for log files within a short period of time and would make it difficult to find certain events, different levels of urgency are defined, which can be switched on and off as needed.
Common Definition of Log Levels:
- Fatal: Error that leads to the termination of the application.
- Error: Runtime error that hinders the operation of the application, or unexpected program error.
- Warning: Calling an outdated interface, incorrectly calling an interface, user error, or unfavorable program state.
- Info: Runtime information such as the start and stop of the application, user logins and logouts, and business transactions performed.
- Debug: Information about the program schedule. Normally only used in development or to reproduce a bug.
- Trace: Detailed follow-up of the program sequence, especially to understand a programming error.
It is important to note that log files and databases should only contain information about the program’s running and status, but not information about the users of the program.
Tagged With snowbjw