code: public static String jsonifyEvent(Object event, String eventType, String serverName, String wlpUserDir, String serverHostName, String[] tags,
                                        int maxFieldLength) {
  
          if (eventType.equals(CollectorConstants.GC_EVENT_TYPE)) {
  
              if (event instanceof GCData) {
  
                  return jsonifyGCEvent(wlpUserDir, serverName, serverHostName, event, tags);
  
              } else {
  
                  return jsonifyGCEvent(-1, wlpUserDir, serverName, serverHostName, CollectorConstants.GC_EVENT_TYPE, event, tags);
  
              }
  
          } else if (eventType.equals(CollectorConstants.MESSAGES_LOG_EVENT_TYPE)) {
  
              return jsonifyTraceAndMessage(maxFieldLength, wlpUserDir, serverName, serverHostName, CollectorConstants.MESSAGES_LOG_EVENT_TYPE, event, tags);
  
          } else if (eventType.equals(CollectorConstants.TRACE_LOG_EVENT_TYPE)) {
  
              return jsonifyTraceAndMessage(maxFieldLength, wlpUserDir, serverName, serverHostName, CollectorConstants.TRACE_LOG_EVENT_TYPE, event, tags);
  
          } else if (eventType.equals(CollectorConstants.FFDC_EVENT_TYPE)) {
  
              return jsonifyFFDC(maxFieldLength, wlpUserDir, serverName, serverHostName, event, tags);
  
          } else if (eventType.equals(CollectorConstants.ACCESS_LOG_EVENT_TYPE)) {
  
              return jsonifyAccess(wlpUserDir, serverName, serverHostName, event, tags);
  
          } else if (eventType.equals(CollectorConstants.AUDIT_LOG_EVENT_TYPE)) {
  
              return jsonifyAudit(wlpUserDir, serverName, serverHostName, event, tags);
  
          }
          return "";
  
      }
docs: Method to return log event data in json format. This method is for collector version greater than 1.0
  
  @param event The object originating from logging source which contains necessary fields
  @param eventType The type of event
  @param servername The name of the server
  @param wlpUserDir The name of wlp user directory
  @param serverHostName The name of server host
  @param collectorVersion The version number
  @param tags An array of tags
  @param maxFieldLength The max character length of strings