private void logHeaders(String tag, HttpMessage message, String[] headers) {
    logMessage.append(tag).append(" (");
    for (String header : headers) {
      if (message.headers().get(header) != null) {
        logMessage.append("[").append(header).append("=").append(message.headers().get(header)).append("] ");
        structuredLogMessage.put(header, message.headers().get(header));
      }
    }
    boolean isChunked = HttpUtil.isTransferEncodingChunked(message);
    logMessage.append("[isChunked=").append(isChunked).append("]");
    logMessage.append(")");
    structuredLogMessage.put("isChunked", String.valueOf(isChunked));
  }
Appends specified headers to the log message if those headers are not null
@param tag pretty name for set of headers to append
@param message http message from which to log headers
@param headers array of headers to log
ambry-rest/src/main/java/com/github/ambry/rest/PublicAccessLogHandler.java