parseSpringLogLevel function
Reads a level name as written in configuration (logging.level.*):
trace, debug, info, warn or warning, error (also fatal)
and off, in any case and with spaces around. null for anything
else, so the caller can report the bad value.
Implementation
SpringLogLevel? parseSpringLogLevel(String? value) =>
switch (value?.trim().toLowerCase()) {
'trace' => SpringLogLevel.trace,
'debug' => SpringLogLevel.debug,
'info' => SpringLogLevel.info,
'warn' || 'warning' => SpringLogLevel.warning,
'error' || 'fatal' => SpringLogLevel.error,
'off' => SpringLogLevel.off,
_ => null,
};