gpt4 book ai didi

rest - 关闭 requestLog

转载 作者:行者123 更新时间:2023-12-04 13:13:33 30 4
gpt4 key购买 nike

我们刚刚从 0.6.2 或 0.7 升级了我们的 dropwizard 版本,发现 .yml 文件中的很多配置都发生了变化。尽管我们能够弄清楚其中的大部分,但我们无法弄清楚如何关闭“requestLog”。在 0.6.2 中,我们做了以下事情:

requestLog:
# Settings for logging to stdout.
console:
# If true, log requests to stdout.
enabled: false
# The time zone in which dates should be displayed.

但是看着新 documentation :

我们没有看到任何关于如何禁用请求日志的引用。关于我们如何实现在 dropwizard 0.7 中关闭请求日志的目标的任何想法?

最佳答案

requestLog属性现在配置在 server 下属性(property)。它看起来像 enabled属性(property)已被删除。您可以通过设置一个空的 appender 列表来解决这个问题。尝试这样的事情:

server:
applicationConnectors:
- type: http
port: 9000
adminConnectors:
- type: http
port: 9001
requestLog:
appenders: []

关于rest - 关闭 requestLog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23505403/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com