Logging
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.
Otherwise, the driver logs a single warning via JUL
(java.util.logging
) and logging is otherwise disabled.
The driver uses the following logger names:
org.mongodb.driver
: the root loggercluster
: for logs related to monitoring of the MongoDB servers to which the driver connectsconnection
: for logs related to connections and connection poolsprotocol
: for logs related to protocol messages sent to and received from a MongoDB serverinsert
: for logs related to insert messages and responsesupdate
: for logs related to update messages and responsesdelete
: for logs related to delete messages and responsesquery
: for logs related to query messages and responsesgetmore
: for logs related togetmore
messages and responseskillcursor
: for logs related tokillcursor
messages and responsescommand
: for logs related to command messages and responses
uri
: for logs related to connection string parsingmanagement
: for logs related to JMX