关闭requestLog

时间:2014-05-06 22:11:52

标签: 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.

但是看看新的documentation

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

1 个答案:

答案 0 :(得分:16)

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

server:
  applicationConnectors:
  - type: http 
    port: 9000
  adminConnectors:
  - type: http
    port: 9001
  requestLog:
    appenders: []
相关问题