if(pkg == null){
IType type = project.findType(name);
if(type == null || !type.exists()){
String message =
Services.getMessage("log4j.logger.name.invalid", name);
errors.add(new Error(
message, file, locator.getLineNumber(), 1, false
));
}
}
}
}else if(PRIORITY.equals(localName) || LEVEL.equals(localName)){
String value = atts.getValue(VALUE);
if(atts.getValue(CLASS) == null && value != null){
if(!LEVELS.contains(value.trim().toLowerCase())){
String message =
Services.getMessage("log4j.level.name.invalid", value);
errors.add(new Error(
message, file, locator.getLineNumber(), 1, false
));
}
}
}
// validate any class attributes.
String classname = atts.getValue(CLASS);
if(classname != null){
IType type = project.findType(classname);
if(type == null || !type.exists()){
String message = Services.getMessage("type.not.found",
project.getElementName(), classname);
errors.add(new Error(
message, file, locator.getLineNumber(), 1, false
));
}
}
}catch(Exception e){