关闭requestLog [英] Turning off requestLog
问题描述
我们刚刚从0.6.2或0.7升级了dropwizard版本,发现.yml文件中的许多配置已更改.尽管我们能够找出其中的大多数,但我们无法找出如何关闭"requestLog".在0.6.2中,我们执行了以下操作:
We just upgraded our dropwizard version from 0.6.2 or 0.7 and found out that a lot of configurations have changed in .yml file. Although we were able to figure out most of them, we cannot figure out how to turn off the "requestLog". In 0.6.2 we did the following:
requestLog:
# Settings for logging to stdout.
console:
# If true, log requests to stdout.
enabled: false
# The time zone in which dates should be displayed.
但是请查看新的文档:
我们没有看到有关如何禁用请求日志的任何参考.关于如何实现关闭dropwizard 0.7中的请求日志目标的任何想法?
we do not see any reference to how we can disable the request logs. Any ideas as to how we can achieve our goal of turning off the request log in dropwizard 0.7 ?
推荐答案
现在在 server
属性下配置了 requestLog
属性.看起来 enabled
属性已被删除.您可以通过设置一个空的追加程序列表来解决此问题.尝试这样的事情:
The requestLog
property is now configured under the server
property. And it looks like the enabled
property has been removed. You can get around this by setting an empty appenders list. Try something like this:
server:
applicationConnectors:
- type: http
port: 9000
adminConnectors:
- type: http
port: 9001
requestLog:
appenders: []
这篇关于关闭requestLog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!