pub enum Level {
Panic,
Bug,
Error,
Warning,
Surprise,
Info,
Debug,
}
Expand description
Levels are not in order.
Variants§
Panic
The program violated a self-imposed constraint, ended up in an inconsistent state, and cannot recover. Handlers must not actually panic. (should they?)
Bug
The program violated a self-imposed constraint, ended up in an inconsistent state, but some state can be recovered.
Error
Invalid data given by an external source, some state of the program must be dropped.
Warning
Invalid data given by an external source, parts of data are ignored. No previous program state needs to be dropped.
Surprise
External source not in an expected state, but not violating any protocols (including no relevant protocol).
Info
A change in internal state that results in a change of behaviour that a user can observe, and a tinkerer might find useful. E.g. selection of external sources, like loading user’s UI files, language switch, overrides.
Debug
Information useful for application developer only. Should be limited to information gotten from external sources, and more tricky parts of internal state.