【问题标题】:Disable spymemcached logging in version 2.12在 2.12 版本中禁用 spymemcached 日志记录
【发布时间】:2017-04-11 18:36:59
【问题描述】:

我们最近对 spymemcached 库进行了版本更改。
特别是从版本2.9.12.12.1

似乎变化每秒都会产生一条日志消息,如下所示:

2017-04-11 17:20:13,668 Memcached IO over {MemcachedConnection to localhost/127.0.0.1:11211} DEBUG [n.s.m.p.a.AsciiMemcachedNodeImpl:72] log | Selecting with delay of 1000ms
2017-04-11 17:20:14,668 Memcached IO over {MemcachedConnection to localhost/127.0.0.1:11211} DEBUG [n.s.m.p.a.AsciiMemcachedNodeImpl:72] log | Done dealing with queue.
2017-04-11 17:20:14,668 Memcached IO over {MemcachedConnection to localhost/127.0.0.1:11211} DEBUG [n.s.m.p.a.AsciiMemcachedNodeImpl:72] log | Selecting with delay of 1000ms
2017-04-11 17:20:15,669 Memcached IO over {MemcachedConnection to localhost/127.0.0.1:11211} DEBUG [n.s.m.p.a.AsciiMemcachedNodeImpl:72] log | Done dealing with queue.

我在AsciiMemcachedNodeImpl类的代码中看到的是:

71    getLogger().debug("Set up %s with %s keys and %s callbacks", this,
72        pcb.numKeys(), pcb.numCallbacks());

我想应该有一种方法可以配置spymemcached 日志记录。
要么在运行时通过代码运行。
有谁知道如何摆脱这些日志?

注意This question 有一个答案,尽管根据其日期,它似乎适用于版本 <= 2.9.1,因为 net.spy.log 包和 LoggerImpl 类不再存在。我在整个spymemcached 源代码中也找不到任何setLevel 函数。

【问题讨论】:

    标签: logging couchbase spymemcached


    【解决方案1】:

    好吧,我终于解决了这个问题,添加了这一行:

    <logger name="net.spy.memcached.protocol.ascii" level="info"/>
    

    logback.xml处理文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-06
      • 2018-07-17
      • 2011-06-22
      • 2015-04-21
      • 2015-02-01
      • 2012-09-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多