Log Levels
The Log system is based around the concept of ‘Levels’. An entry in the log is always assigned one of four levels.
At run time, a ConfigObject is created and an “Output Level” is assigned. If the Output Level is lower than a Log Entry, then the Entry is not printed.
Log levels therefore allow the user to determine (at runtime) what level of detail is output (either to terminal, or to file).
Enumerations
-
enum LogLevel
An encoding for different levels of logs. Levels are hierarchical: WARN includes ERROR, and INFO includes WARN (and therefore, also ERROR).
Levels are assumed to be numerically increasing. A lower level means more important.
Values:
-
enumerator ERROR
Level 0. Used to indicate points where the code is throwing errors.
-
enumerator WARN
Level 1. Used to indicate where problems were encountered, but a default assumption was made. Also used to indicate are you sure about this?.
-
enumerator INFO
Level 2. General progress information.
-
enumerator DEBUG
Level 3. High density of information, likely to bottleneck code. Used for debugging information.
-
enumerator MAXLEVEL
Used as an indicator of the ‘allowed max log level’ - used only for loop checks etc. Should never be assigned to.
-
enumerator ERROR