@SuppressWarnings("rawtypes")
  public Object getValue(final String fieldName, final LogData event) {
    String upperField = fieldName.toUpperCase(Locale.US);
    if (LOGGER_FIELD.equals(upperField)) {
      return event.getLoggerName();
    } else if (LEVEL_FIELD.equals(upperField)) {
      return event.getLevel();
    } else if (MSG_FIELD.equals(upperField) || MESSAGE_FIELD.equals(upperField)) {
      return event.getMessage();
    } else if (NDC_FIELD.equals(upperField)) {
      String ndcValue = event.getNDC();
      return ((ndcValue == null) ? EMPTY_STRING : ndcValue);
    } else if (TIMESTAMP_FIELD.equals(upperField)) {
      return new Long(event.getDate().getTime());
    } else if (DATE_FIELD.equals(upperField)) {
      return new Long(event.getDate().getTime());
    } else if (THREAD_FIELD.equals(upperField)) {
      return event.getThread();
    } else if (upperField.startsWith(PROP_FIELD)) {
      // FIXME investigate
      // note: need to use actual fieldname since case matters
      Map<String, String> properties = event.getProperties();
      String propName = fieldName.substring(PROP_FIELD.length());
      Object propValue = properties.get(propName);
      if (propValue == null) {
        // case-specific match didn't work, try case insensitive match
        String lowerPropKey = propName.toLowerCase();
        Set entrySet = properties.entrySet();
        for (Object anEntrySet : entrySet) {
          Map.Entry thisEntry = (Map.Entry) anEntrySet;
          if (thisEntry.getKey().toString().equalsIgnoreCase(lowerPropKey)) {
            propValue = thisEntry.getValue();
          }
        }
      }
      return ((propValue == null) ? EMPTY_STRING : propValue.toString());
    } else if (MARK_FIELD.equals(upperField)) {
      if (event.isMarked()) {
        return event.getMarkerColors();
      } else {
        return "";
      }
    } else if (NOTE_FIELD.equals(upperField)) {
      return event.getNote().getNote();
    } else {
      if (CLASS_FIELD.equals(upperField)) {
        return ((event.getClazz() == null) ? EMPTY_STRING : event.getClazz());
      } else if (FILE_FIELD.equals(upperField)) {
        return ((event.getFile() == null) ? EMPTY_STRING : event.getFile());
      } else if (LINE_FIELD.equals(upperField)) {
        return ((event.getLine() == null) ? EMPTY_STRING : event.getLine() == null);
      } else if (METHOD_FIELD.equals(upperField)) {
        return ((event.getMethod() == null) ? EMPTY_STRING : event.getMethod());
      }
    }

    // there wasn't a match, so throw a runtime exception
    throw new IllegalArgumentException("Unsupported field name: " + fieldName);
  }
Get value of field.

@param fieldName field
@param event     event
@return value of field
olv-core/src/main/java/pl/otros/logview/accept/query/org/apache/log4j/spi/LoggingEventFieldResolver.java