Turning off requestLog

不打扰是莪最后的温柔 提交于 2021-02-07 13:44:04

问题


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.

But looking at the new documentation:

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 ?


回答1:


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: []


来源:https://stackoverflow.com/questions/23505403/turning-off-requestlog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!