我正在编写一个sbt插件(sbt 0.13.5),它提供与Cassandra交互的任务(使用数据交换驱动程序)。当调用插件的任务时,sbt控制台打印由第三方类(数据存储驱动程序)创建的日志输出,该输出不应显示给用户(以[pool-445-thread-1]
开头的行):
[sbt-pillar-plugin-play-sample] $ createKeyspace
[info] Creating keyspace my_keyspace at 192.168.33.99:9042
[pool-445-thread-1] WARN com.datastax.driver.core.FrameCompressor - Cannot find Snappy class, you should make sure the Snappy library is in the classpath if you intend to use it. Snappy compression will not be available for the protocol.
[pool-445-thread-1] WARN com.datastax.driver.core.FrameCompressor - Cannot find LZ4 class, you should make sure the LZ4 library is in the classpath if you intend to use it. LZ4 compression will not be available for the protocol.
[success] Total time: 2 s, completed Jun 10, 2014 11:07:20 PM
使用slf4j的FrameCompressor日志,我为测试sbt插件而创建的示例项目正在使用play 2.3.0。
我已经尝试在logback.xml
sbt插件中放置一个src/main/resources
但没有成功 - 日志消息仍然显示。
如何将FrameCompressor的日志级别设置为ERROR?