final String[] pair = def.split("=");
if (pair == null || pair.length != 2) {
LOGGER.error("Invalid option {}", def);
continue;
}
final Level level = Level.toLevel(pair[0].trim(), null);
if (level == null) {
LOGGER.error("Invalid Level {}", pair[0].trim());
}
levelMap.put(level, pair[1].trim());
}
if (levelMap.size() == 0) {
return INSTANCE;
}
for (final Level level : Level.values()) {
if (!levelMap.containsKey(level)) {
levelMap.put(level, level.toString());
}
}
return new LevelPatternConverter(levelMap);
}