docs: public String traceFormatGenData(GenericData genData) {
  
          KeyValuePair[] pairs = genData.getPairs();
          KeyValuePair kvp = null;
          String txt = null;
          Integer id = null;
          String objId;
          Integer levelVal = null;
          String name;
  
          String className = null;
          String method = null;
          String loggerName = null;
          Long ibm_datetime = null;
  
          String corrId = null;
          String org = null;
          String prod = null;
          String component = null;
  
          String sym = null;
          String logLevel = null;
  
          String threadName = null;
          String stackTrace = null;
          for (KeyValuePair p : pairs) {
  
              if (p != null && !p.isList()) {
  
                  kvp = p;
                  if (kvp.getKey().equals(LogFieldConstants.MESSAGE)) {
                      txt = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.IBM_DATETIME)) {
                      ibm_datetime = kvp.getLongValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.SEVERITY)) {
                      sym = " " + kvp.getStringValue() + " ";
                  } else if (kvp.getKey().equals(LogFieldConstants.IBM_CLASSNAME)) {
                      className = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.IBM_METHODNAME)) {
                      method = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.MODULE)) {
                      loggerName = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.OBJECT_ID)) {
                      id = kvp.getIntValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.CORRELATION_ID)) {
                      corrId = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.ORG)) {
                      org = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.PRODUCT)) {
                      prod = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.COMPONENT)) {
                      component = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.LOGLEVEL)) {
                      logLevel = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.THREADNAME)) {
                      threadName = kvp.getStringValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.LEVELVALUE)) {
                      levelVal = kvp.getIntValue();
                  } else if (kvp.getKey().equals(LogFieldConstants.THROWABLE)) {
                      stackTrace = kvp.getStringValue();
                  }
  
              }
          }
  
          StringBuilder sb = new StringBuilder(256);
  
          // Common header
          sb.append('[').append(DateFormatHelper.formatTime(ibm_datetime, useIsoDateFormat)).append("] ");
          sb.append(DataFormatHelper.getThreadId());
  
          switch (traceFormat) {
              default:
              case ENHANCED:
                  objId = generateObjectId(id, true);
                  name = nonNullString(className, loggerName);
  
                  sb.append(" id=").append(objId).append(' ');
                  formatFixedString(sb, name, enhancedNameLength);
                  sb.append(sym); // sym has built-in padding
                  if (method != null) {
                      sb.append(method).append(' ');
                  }
  
                  // append formatted message -- txt includes formatted args
                  sb.append(txt);
                  if (stackTrace != null)
                      sb.append(LoggingConstants.nl).append(stackTrace);
                  break;
              case BASIC:
                  name = nonNullString(loggerName, className);
  
                  sb.append(' '); // pad after thread id
                  fixedClassString(sb, name, basicNameLength);
                  sb.append(sym);
  
                  if (className != null)
                      sb.append(className);
                  sb.append(' '); // yes, this space is always there.
  
                  if (method != null)
                      sb.append(method);
                  sb.append(' '); // yes, this space is always there.
  
                  // append formatted message -- includes formatted args
                  sb.append(txt);
                  if (stackTrace != null)
                      sb.append(nlBasicPadding).append(stackTrace);
                  break;
              case ADVANCED:
                  objId = generateObjectId(id, false);
                  name = nonNullString(loggerName, null);
  
                  sb.append(' '); // pad after thread id
                  sb.append(sym);
  
                  // next append the correlation id.
                  sb.append("UOW=");
                  if (corrId != null)
                      sb.append(corrId);
  
                  // next enter the logger name.
                  sb.append(" source=").append(name);
  
                  // append className if non-null
                  if (className != null)
                      sb.append(" class=").append(className);
  
                  // append methodName if non-null
                  if (method != null)
                      sb.append(" method=").append(method);
  
                  if (id != null)
                      sb.append(" id=").append(objId);
  
                  //check the comparison to WsLogRecord
                  if (org != null && prod != null && component != null) {
                      // next append org, prod, component, if set. Reference equality check is ok here.
                      sb.append(" org=");
                      sb.append(org);
                      sb.append(" prod=");
                      sb.append(prod);
                      sb.append(" component=");
                      sb.append(component);
  
                      //get thread name
                  } else {
                      //ibm_threadId replace check if you can use this as the thread
                      sb.append(" thread=[").append(threadName).append("]");
                  }
  
                  // append formatted message -- txt includes formatted args
                  sb.append(nlAdvancedPadding).append(txt);
                  if (stackTrace != null)
                      sb.append(nlAdvancedPadding).append(stackTrace);
                  break;
          }
          return sb.toString();
      }