@@ -15,11 +15,6 @@ Overview
15
15
16
16
In this guide, you can learn how to set up and configure a logger in the {+driver-short+}.
17
17
18
- You will learn how to:
19
-
20
- - Set up a logger by using Simple Logging Facade for Java (SLF4J)
21
- - Configure the log level
22
-
23
18
This guide shows how to record events in the driver. If you want to learn how to
24
19
use information about the activity of the driver in code, see the :ref:`kotlin-sync-monitoring`
25
20
guide.
@@ -35,7 +30,7 @@ your project:
35
30
36
31
- The ``slf4j-api`` artifact in your classpath
37
32
- A logging framework
38
- - A **binding**
33
+ - A **binding** that connects the ``slf4j-api`` artifact to a logging framework
39
34
40
35
If the driver can't find the ``slf4j-api`` artifact in your classpath, the driver outputs
41
36
the following warning and disables all further logging:
@@ -44,8 +39,6 @@ the following warning and disables all further logging:
44
39
45
40
WARNING: SLF4J not found on the classpath. Logging is disabled for the 'org.mongodb.driver' component
46
41
47
- A binding is a piece of code that connects the ``slf4j-api`` artifact to a logging framework.
48
-
49
42
Logger Setup Example
50
43
~~~~~~~~~~~~~~~~~~~~
51
44
@@ -58,7 +51,7 @@ The following example shows how to set up a logger. Select the :guilabel:`Logbac
58
51
:tabid: Logback-binding
59
52
60
53
Select the :guilabel:`Maven` or :guilabel:`Gradle` tab to learn about how to set up
61
- Logback with your project's dependency management tool.
54
+ Logback with your project's dependency management tool:
62
55
63
56
.. tabs::
64
57
@@ -97,9 +90,6 @@ The following example shows how to set up a logger. Select the :guilabel:`Logbac
97
90
Logback logger's log level, see the
98
91
:ref:`Configure Log Level <kotlin-sync-configure-log-level>` section of this page.
99
92
100
- For more information about Logback, see the
101
- `Logback manual <https://logback.qos.ch/manual/>`__.
102
-
103
93
.. tab:: Log4j2
104
94
:tabid: Log4j2-binding
105
95
@@ -290,31 +280,31 @@ The {+driver-short+} defines the following logger names to organize different lo
290
280
* - Logger Name
291
281
- Description
292
282
293
- * - org.mongodb.driver.authenticator
283
+ * - `` org.mongodb.driver.authenticator``
294
284
- Logs authentication events
295
285
296
- * - org.mongodb.driver.client
286
+ * - `` org.mongodb.driver.client``
297
287
- Logs events related to MongoClient instances
298
288
299
- * - org.mongodb.driver.cluster
289
+ * - `` org.mongodb.driver.cluster``
300
290
- Logs events related to monitoring of MongoDB deployments
301
291
302
- * - org.mongodb.driver.connection
292
+ * - `` org.mongodb.driver.connection``
303
293
- Logs connections and connection pools
304
294
305
- * - org.mongodb.driver.connection.tls
295
+ * - `` org.mongodb.driver.connection.tls``
306
296
- Logs TLS events
307
297
308
- * - org.mongodb.driver.operation
298
+ * - `` org.mongodb.driver.operation``
309
299
- Logs operations, including logging related to automatic retries
310
300
311
- * - org.mongodb.driver.protocol
301
+ * - `` org.mongodb.driver.protocol``
312
302
- Logs commands sent to and replies received from MongoDB deployments
313
303
314
- * - org.mongodb.driver.uri
304
+ * - `` org.mongodb.driver.uri``
315
305
- Logs connection string parsing events
316
306
317
- * - org.mongodb.driver.management
307
+ * - `` org.mongodb.driver.management``
318
308
- Logs Java Management Extensions (JMX) events
319
309
320
310
Logger Name Example
@@ -404,7 +394,7 @@ Select the :guilabel:`Logback` or :guilabel:`Log4j2` tab to see the correspondin
404
394
Additional Information
405
395
----------------------
406
396
407
- To learn more about MongoDB's logging capabilities, see :manual:`log-messages` in the {+mdb-server+}
397
+ To learn more about MongoDB's logging capabilities, see :manual:`</ log-messages> ` in the {+mdb-server+}
408
398
manual.
409
399
410
400
For complete information about the logging frameworks discussed in this guide, see the
0 commit comments