【发布时间】:2017-04-11 18:36:59
【问题描述】:
我们最近对 spymemcached 库进行了版本更改。
特别是从版本2.9.1 到2.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