{
// don't add any severity
}
else
{
Severity errorSeverity =
Severity.parseString(defSev.name());
if(errorSeverity != null)
{
defaultSeverities.add(errorSeverity);
}
}
}
}
definedSeverities.clear();
for(String overrideSeverity : config.getOverrideSeverity())
{
if(overrideSeverity != null)
{
int equalPos = overrideSeverity.indexOf('=');
if (equalPos < 0)
{
Message msg = WARN_ERROR_LOGGER_INVALID_OVERRIDE_SEVERITY.get(
overrideSeverity);
resultCode = DirectoryServer.getServerErrorResultCode();
messages.add(msg);
} else
{
String categoryName = overrideSeverity.substring(0, equalPos);
categoryName = categoryName.replace("-", "_").toUpperCase();
try
{
Category category = Category.valueOf(categoryName);
HashSet<Severity> severities =
new HashSet<Severity>();
StringTokenizer sevTokenizer =
new StringTokenizer(overrideSeverity.substring(equalPos+1), ",");
while (sevTokenizer.hasMoreElements())
{
String severityName = sevTokenizer.nextToken();
severityName = severityName.replace("-", "_").toUpperCase();
if(severityName.equalsIgnoreCase(LOG_SEVERITY_ALL))
{
severities.add(Severity.FATAL_ERROR);
severities.add(Severity.INFORMATION);
severities.add(Severity.MILD_ERROR);
severities.add(Severity.MILD_WARNING);
severities.add(Severity.NOTICE);
severities.add(Severity.SEVERE_ERROR);
severities.add(Severity.SEVERE_WARNING);
}
else
{
try
{
Severity severity =
Severity.parseString(severityName);
severities.add(severity);
}
catch(Exception e)