我有一个 sbt 项目,我使用 MongoDB(驱动程序 Casbah)。
我想在我的应用程序上记录日志,所以我尝试使用 Logback 框架。它有效,但我不明白我的代码在做什么..
这是我的日志代码:
def logger = LoggerFactory.getLogger("Test log")
StatusPrinter.print(LoggerFactory.getILoggerFactory.asInstanceOf[LoggerContext])
logger.info("Azuken")
这是我的日志:
14:36:16.616 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Registering Scala Conversions.
14:36:16.633 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Deserializers for Scala Conversions registering
14:36:16.641 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Serializers for Scala Conversions registering
14:36:16.647 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Setting up OptionSerializer
14:36:16.658 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Setting up ScalaCollectionSerializer
14:36:16.669 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Setting up ScalaRegexSerializers
14:36:16.677 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Hooking up scala.util.matching.Regex serializer
14:36:16.683 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Reached base registration method on MongoConversionHelper.
14:36:17.056 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Registering Scala Conversions.
14:36:17.059 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Deserializers for Scala Conversions registering
14:36:17.063 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Serializers for Scala Conversions registering
14:36:17.067 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Setting up OptionSerializer
14:36:17.071 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Setting up ScalaCollectionSerializer
14:36:17.079 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Setting up ScalaRegexSerializers
14:36:17.083 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Hooking up scala.util.matching.Regex serializer
14:36:17.087 [run-main] DEBUG c.m.c.c.c.s.RegisterConversionHelpers$ - Reached base registration method on MongoConversionHelper.
我已经看到这是 MongoDB 操作,但我不明白我的代码的哪一行做了什么......
有什么解释吗?我在网上搜索过,但没有找到很好的解释。