code: private static void configureFields(MdcGelfMessageAssembler mdcGelfMessageAssembler, GelfLogField[] fields,
              GelfDynamicMdcLogFields[] dynamicFieldArray) {
  
      	if (fields == null || fields.length == 0) {
              mdcGelfMessageAssembler.addFields(LogMessageField.getDefaultMapping(Time, Severity, ThreadName, SourceClassName,
                      SourceMethodName, SourceLineNumber, SourceSimpleClassName, LoggerName, Marker));
              return;
          }
  
          for (GelfLogField field : fields) {
  
              if (Strings.isNotEmpty(field.getMdc())) {
                  mdcGelfMessageAssembler.addField(new MdcMessageField(field.getName(), field.getMdc()));
              }
  
              if (Strings.isNotEmpty(field.getLiteral())) {
                  mdcGelfMessageAssembler.addField(new StaticMessageField(field.getName(), field.getLiteral()));
              }
  
              if (field.getPatternLayout() != null) {
                  mdcGelfMessageAssembler.addField(new PatternLogMessageField(field.getName(), null, field.getPatternLayout()));
              }
          }
  
          if (dynamicFieldArray != null) {
              for (GelfDynamicMdcLogFields gelfDynamicMdcLogFields : dynamicFieldArray) {
                  mdcGelfMessageAssembler.addField(new DynamicMdcMessageField(gelfDynamicMdcLogFields.getRegex()));
              }
          }
      }
docs: Configure fields (literals, MDC, layout).
  
  @param mdcGelfMessageAssembler the assembler
  @param fields static field array
  @param dynamicFieldArray dynamic field array