【问题标题】:Disable Logging for Akka STM (Multiverse)禁用 Akka STM (Multiverse) 的日志记录
【发布时间】:2011-10-20 08:21:25
【问题描述】:

我正在使用akka stm,当我的应用程序启动时它会打印出来(到标准错误):

Okt 20, 2011 10:17:10 AM org.multiverse.api.GlobalStmInstance <clinit>
Information: Initializing GlobalStmInstance using factoryMethod 'org.multiverse.stms.alpha.AlphaStm.createFast'.
Okt 20, 2011 10:17:10 AM org.multiverse.stms.alpha.AlphaStm <init>
Information: Created a new AlphaStm instance
Okt 20, 2011 10:17:10 AM org.multiverse.api.GlobalStmInstance <clinit>
Information: Successfully initialized GlobalStmInstance using factoryMethod 'org.multiverse.stms.alpha.AlphaStm.createFast'.

如何禁用它(日志记录)?

【问题讨论】:

标签: scala logging akka stm


【解决方案1】:

虽然我确信通过配置 xml 文件有更好的解决方案,但这是一个对我有用的快速修复:

import java.util.logging.{Logger, Level}

object DisableLogging { 
  Logger.getLogger("org.multiverse.api.GlobalStmInstance").setLevel(Level.OFF)
  Logger.getLogger("org.multiverse.stms.alpha.AlphaStm").setLevel(Level.OFF)
}

【讨论】:

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