此版本的文档已存档,不再提供支持。查看 最新文档,学习;了解如何升级您的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 相关的日志