我在play框架2中使用了MemCachedClient,我得到了这样的INFO消息:
2014-06-12 11:37:45.513 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2014-06-12 11:37:45.516 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@1ab07e8
我想把它们关掉。我怎样才能在Play框架2中实现它
答案 0 :(得分:1)
在创建MemcachedClient
对象之前添加以下代码行对我来说很有用。
System.setProperty("net.spy.log.LoggerImpl", "net.spy.memcached.compat.log.SunLogger");
Logger.getLogger("net.spy.memcached").setLevel(Level.WARNING);
答案 1 :(得分:0)
您应该可以在logger.net.spy.memcached=OFF
中设置application.conf
。或者可能只是将其提升到更高的值WARN
或ERROR
。