code: public static Rule getRule(final String p1, final String p2) {
      if (p1.equalsIgnoreCase(LoggingEventFieldResolver.LEVEL_FIELD)) {
          return LevelEqualsRule.getRule(p2);
      } else if (p1.equalsIgnoreCase(LoggingEventFieldResolver.TIMESTAMP_FIELD)) {
          return TimestampEqualsRule.getRule(p2);
      } else {
          return new EqualsRule(p1, p2);
      }
    }
docs: Create new instance.
  @param p1 field, special treatment for level and timestamp.
  @param p2 value
  @return new instance