code: protected String makeHeaderNamesLowercaseInLogFormat(String logformat) {
          // In vim I would simply do: %s@{\([^}]*\)}@{\L\1\E@g
          // But such an expression is not (yet) possible in Java
          StringBuffer sb = new StringBuffer(logformat.length());
  
          // All patterns that have a 'name' (note we do NOT do it to %{...}t )
          Pattern p = Pattern.compile("%\\{([^}]*)}([^t])");
          Matcher m = p.matcher(logformat);
          while (m.find()) {
              m.appendReplacement(sb, "%{"+m.group(1).toLowerCase()+'}'+m.group(2));
          }
          m.appendTail(sb);
  
          return sb.toString();
      }
docs: --------------------------------------------