code: protected String formatStreamOutput(GenericData genData) {
          String txt = null;
          String loglevel = null;
          KeyValuePair kvp = null;
  
          KeyValuePair[] pairs = genData.getPairs();
          for (KeyValuePair p : pairs) {
  
              if (p != null && !p.isList()) {
  
                  kvp = p;
                  if (kvp.getKey().equals("message")) {
                      txt = kvp.getStringValue();
                  } else if (kvp.getKey().equals("loglevel")) {
                      loglevel = kvp.getStringValue();
                  }
              }
          }
  
          String message = BaseTraceService.filterStackTraces(txt);
          if (message != null) {
              if (loglevel.equals("SystemErr")) {
                  message = "[err] " + message;
              }
          }
          return message;
      }
docs: Outputs filteredStream of genData
  
  @param genData object to filter
  @return filtered message of the genData