public static Alert fromString(String s) {
    int firstBracket = s.indexOf('[');
    int lastBracket = s.indexOf(']');

    final String message = s.substring(lastBracket + 1).trim();

    String stamp = s.substring(firstBracket, lastBracket);
    StringTokenizer st = new StringTokenizer(stamp, "[ ");

    final int level = LogLevel.getLogWriterLevel(st.nextToken());

    StringBuilder sb = new StringBuilder();
    sb.append(st.nextToken());
    sb.append(" ");
    sb.append(st.nextToken());
    sb.append(" ");
    sb.append(st.nextToken());

    final DateFormat timeFormatter = DateFormatter.createDateFormat();
    final Date date;
    try {
      date = timeFormatter.parse(sb.toString());

    } catch (ParseException ex) {
      throw new IllegalArgumentException(
          String.format("Invalidate timestamp: %s", sb));
    }

    // Assume that the connection name is only one token...
    final String connectionName = st.nextToken();

    sb = new StringBuilder();
    while (st.hasMoreTokens()) {
      sb.append(st.nextToken());
      sb.append(" ");
    }
    final String sourceId = sb.toString().trim();

    Assert.assertTrue(!st.hasMoreTokens());

    return new Alert() {
      @Override
      public int getLevel() {
        return level;
      }

      @Override
      public GemFireVM getGemFireVM() {
        return null;
      }

      @Override
      public String getConnectionName() {
        return connectionName;
      }

      @Override
      public String getSourceId() {
        return sourceId;
      }

      @Override
      public String getMessage() {
        return message;
      }

      @Override
      public Date getDate() {
        return date;
      }

      @Override
      public InternalDistributedMember getSender() {
        /* Not implemented, currently this is used only for testing purpose */
        return null;
      }
    };
  }
Converts the String return by an invocation of {@link #toString} into an <code>Alert</code>.
geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteAlert.java