-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathdb.getLogComponents.txt
108 lines (91 loc) · 2.41 KB
/
db.getLogComponents.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
=====================
db.getLogComponents()
=====================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
Definition
----------
.. method:: db.getLogComponents()
Returns the current verbosity settings. The verbosity settings
determine the amount of :doc:`/reference/log-messages` that MongoDB
produces for each :ref:`log message component
<log-message-components>`.
If a component inherits the verbosity level of its parent,
:method:`db.getLogComponents()` displays ``-1`` for the component's
verbosity.
Compatibility
-------------
This method is available in deployments hosted in the following environments:
.. include:: /includes/fact-environments-atlas-only.rst
.. include:: /includes/fact-environments-atlas-support-no-free.rst
.. include:: /includes/fact-environments-onprem-only.rst
Output
------
The :method:`db.getLogComponents()` returns a document with the
verbosity settings. For example:
.. code-block:: none
{
"verbosity" : 0,
"accessControl" : {
"verbosity" : -1
},
"command" : {
"verbosity" : -1
},
"control" : {
"verbosity" : -1
},
"geo" : {
"verbosity" : -1
},
"index" : {
"verbosity" : -1
},
"network" : {
"verbosity" : -1
},
"query" : {
"verbosity" : 2
},
"replication" : {
"verbosity" : -1,
"election" : {
"verbosity" : -1
},
"heartbeats" : {
"verbosity" : -1
},
"initialSync" : {
"verbosity" : -1
},
"rollback" : {
"verbosity" : -1
}
},
"sharding" : {
"verbosity" : -1
},
"storage" : {
"verbosity" : 2,
"recovery" : {
"verbosity" : -1
},
"journal" : {
"verbosity" : -1
}
},
"write" : {
"verbosity" : -1
}
}
To modify these settings, you can configure the
:setting:`systemLog.verbosity` and
``systemLog.component.<name>.verbosity`` settings in the
:ref:`configuration file <configuration-options>` or set the
:parameter:`logComponentVerbosity` parameter using the
:dbcommand:`setParameter` command or use the :method:`db.setLogLevel()`
method. For examples, see :ref:`log-messages-configure-verbosity`.