operator [] method
Retrieves the LevelLogger associated with the given numerical level.
Throws a StateError if the exact level is not registered.
Implementation
LevelLogger operator [](int level) =>
_levelLoggers[level] ??
(throw StateError('Level $level is not registered'));