Log levels
July 30, 2024
ID 245257
A log level is an attribute of each message in the logging system. The log level is configured through the server and is used when filtering messages in a client.
- Critical
Critical malfunction in program operation that makes it impossible for the program to continue working.
- Error
Program operating error that does not completely prevent the program from continuing to work. This level is applied for logging an unexpected termination of the current operation. It is not recommended to apply this level for logging erroneous user actions.
- Warning
Problem situation that is anticipated and normally handled by the program.
- Info (default)
Information about the current functional performance of the program without additional details. For example, this info can include switching to a new window in the user interface or successfully writing an entry in the database.
- Debug
More detailed log level than Info. It provides more details on program events and may be useful for debugging.
- Trace
The most detailed log level that is used for the most detailed tracking of program events. When this level is enabled, it can have a substantial impact on performance.
Each successive level includes all previous levels. For example, if a server is configured for the Warning level, it forwards messages with the Critical, Error and Warning levels to backends while ignoring messages with the Info, Debug and Trace levels.
The log level when the program sends a message can be defined by doing the following:
- Using the macro with the parameter corresponding to the selected level.
- Passing the value of the
LogrrLogLevel
orLogLevel
enumerator when logging functions are called.