【问题标题】:Dropwizard log to endpointDropwizard 日志到端点
【发布时间】:2015-10-12 16:35:36
【问题描述】:

我希望 dropwizard 登录到端点。

让 dropwizard 记录到文件很容易,即在配置中您只需将类型指定为文件和 currentLogfilename。

但是如何让 dropwizard 登录到 http 端点?

http://x.x.x.x:9181/LogService?level=info&message=dropwizardmessage

【问题讨论】:

标签: logging dropwizard


【解决方案1】:

我的观察是,我配置了以下内容:

<dependency>
    <groupId>io.dropwizard.metrics</groupId>
    <artifactId>metrics-servlets</artifactId>
    <version>${metrics.version}</version>
</dependency>

我能够获得关于 http-endpoint 的指标

http://localhost:adminport/metrics

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-09-17
    • 1970-01-01
    • 2014-06-26
    • 1970-01-01
    • 1970-01-01
    • 2014-10-20
    • 2019-07-28
    • 1970-01-01
    相关资源
    最近更新 更多