关闭requestLog

sha*_*i15 6 rest yaml dropwizard

我们刚刚将dropwizard版本从0.6.2或0.7升级,发现很多配置在.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.
Run Code Online (Sandbox Code Playgroud)

但是看看新文档:

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

con*_*dit 18

requestLog属性现在在server属性下配置.看起来该enabled物业已被删除.你可以通过设置一个空的appenders列表来解决这个问题.尝试这样的事情:

server:
  applicationConnectors:
  - type: http 
    port: 9000
  adminConnectors:
  - type: http
    port: 9001
  requestLog:
    appenders: []
Run Code Online (Sandbox Code Playgroud)