@Override
    protected Mono<Void> doExecute(final ServerWebExchange exchange, final ShenyuPluginChain chain,
                                   final SelectorData selector, final RuleData rule) {
        CommonLoggingRuleHandle commonLoggingRuleHandle = LoggingConsolePluginDataHandler.CACHED_HANDLE.get().obtainHandle(CacheKeyUtils.INST.getKey(rule));
        Set<String> keywordSets = Sets.newHashSet();
        boolean desensitized = Boolean.FALSE;
        KeyWordMatch keyWordMatch = new KeyWordMatch(Collections.emptySet());
        if (Objects.nonNull(commonLoggingRuleHandle)) {
            String keywords = commonLoggingRuleHandle.getKeyword();
            desensitized = StringUtils.isNotBlank(keywords) && commonLoggingRuleHandle.getMaskStatus();
            if (desensitized) {
                Collections.addAll(keywordSets, keywords.split(";"));
                dataDesensitizeAlg = Optional.ofNullable(commonLoggingRuleHandle.getMaskType()).orElse(DataDesensitizeEnum.MD5_ENCRYPT.getDataDesensitizeAlg());
                keyWordMatch = new KeyWordMatch(keywordSets);
                LOG.info("current plugin:{}, keyword:{}, dataDesensitizedAlg:{}", this.named(), keywords, dataDesensitizeAlg);
            }
        }
        ServerHttpRequest request = exchange.getRequest();
        //"Print Request Info: "
        StringBuilder requestInfo = new StringBuilder().append(System.lineSeparator());
        requestInfo.append(getRequestUri(request, desensitized, keyWordMatch))
                .append(getRequestMethod(request, desensitized, keyWordMatch)).append(System.lineSeparator())
                .append(getRequestHeaders(request, desensitized, keyWordMatch)).append(System.lineSeparator())
                .append(getQueryParams(request, desensitized, keyWordMatch)).append(System.lineSeparator());
        final LoggingServerHttpResponse loggingServerHttpResponse = new LoggingServerHttpResponse(exchange.getResponse(), requestInfo, desensitized, keyWordMatch);
        try {
            return chain.execute(exchange.mutate().request(new LoggingServerHttpRequest(request, requestInfo, desensitized, keyWordMatch))
                            .response(loggingServerHttpResponse).build())
                    .doOnError(loggingServerHttpResponse::logError);
        } catch (Exception e) {
            loggingServerHttpResponse.logError(e);
            throw e;
        }
    }
Shenyu logging console plugin. it can print request info(include request headers, request params, request body ...etc) and
response info(include response headers and response body).
shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-console/src/main/java/org/apache/shenyu/plugin/logging/console/LoggingConsolePlugin.java