Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs 菜单
Docs 主页
/ / /
Scala 驱动程序
/

日志记录

By default, logging is enabled via the popular SLF4J API. Logging is optional, so the driver uses SLF4J if the driver detects the presence of SLF4J API (class org.slf4j.Logger) in the classpath.

否则,驱动程序将通过 JUL ( java.util.logging ) 记录单个警告,并禁用日志记录。

驾驶员使用以下记录器名称:

  • org.mongodb.driver:根记录器

    • cluster:用于与监控驾驶员所连接的MongoDB服务器相关的日志

    • connection:用于与连接和连接池相关的日志

    • protocol:用于与 MongoDB 服务器发送和接收的协议消息相关的日志

      • insert:用于与插入消息和响应相关的日志

      • update:用于与更新消息和响应相关的日志

      • delete:用于与删除消息和响应相关的日志

      • query:用于与查询消息和响应相关的日志

      • getmore:用于与getmore消息和响应相关的日志

      • killcursor:用于与killcursor消息和响应相关的日志

      • command:用于与命令消息和响应相关的日志

    • uri:用于与连接string解析相关的日志

    • management:用于与 JMX 相关的日志

后退

参考