return false;
}
public Object getValue(String fieldName, LoggingEvent event) {
String upperField = fieldName.toUpperCase();
LocationInfo info = null;
if (event.locationInformationExists()) {
info = event.getLocationInformation();
}
if (LOGGER_FIELD.equals(upperField)) {
return event.getLoggerName();
} else if (LEVEL_FIELD.equals(upperField)) {
return event.getLevel();
} else if (CLASS_FIELD.equals(upperField)) {
return ((info == null) ? EMPTY_STRING : info.getClassName());
} else if (FILE_FIELD.equals(upperField)) {
return ((info == null) ? EMPTY_STRING : info.getFileName());
} else if (LINE_FIELD.equals(upperField)) {
return ((info == null) ? EMPTY_STRING : info.getLineNumber());
} else if (METHOD_FIELD.equals(upperField)) {
return ((info == null) ? EMPTY_STRING : info.getMethodName());
} else if (MSG_FIELD.equals(upperField)) {
return event.getMessage();
} else if (NDC_FIELD.equals(upperField)) {
String ndcValue = event.getNDC();
return ((ndcValue == null) ? EMPTY_STRING : ndcValue);