additiv = false;
}
// verify categories
if (categories == null) {
throw new ConfigurationException(LogConfigManager.LOG_LOGGERS, "Missing categories in configuration "
+ pid);
}
// verify no other configuration has any of the categories
for (final String cat : categories) {
final LogConfig cfg = configByCategory.get(cat);
if (cfg != null && !pid.equals(cfg.getConfigPid())) {
throw new ConfigurationException(LogConfigManager.LOG_LOGGERS, "Category " + cat
+ " already defined by configuration " + pid);
}
}
// verify log level
if (level == null) {
throw new ConfigurationException(LogConfigManager.LOG_LEVEL, "Value required");
}
// TODO: support numeric levels !
final Level logLevel = Level.toLevel(level);
if (logLevel == null) {
throw new ConfigurationException(LogConfigManager.LOG_LEVEL, "Unsupported value: " + level);
}
// verify pattern
if (pattern == null || pattern.length() == 0) {
pattern = LogConfigManager.LOG_PATTERN_DEFAULT;