@@ -17,7 +17,7 @@ Definition
17
17
18
18
.. method:: db.setProfilingLevel(level, options)
19
19
20
- .. versionchanged:: 4.4.2
20
+ .. versionchanged:: 5.0
21
21
22
22
For a :binary:`~bin.mongod` instance, the method enables, disables,
23
23
or configures the :doc:`/tutorial/manage-the-database-profiler`. The
@@ -28,22 +28,22 @@ Definition
28
28
log.
29
29
30
30
If the :ref:`database profiler level <set-profiling-level-level>` is
31
- ``1`` or ``2`` (i.e. the :doc:`database profiler
31
+ ``1`` or ``2`` (specifically, the :doc:`database profiler
32
32
</tutorial/manage-the-database-profiler/>` is enabled), the
33
33
:ref:`slowms <set-profiling-level-options-slowms>`,
34
34
:ref:`sampleRate <set-profiling-level-options-sampleRate>` affect
35
35
the behavior of both the profiler and the :option:`diagnostic log
36
36
<mongod --logpath>`.
37
37
38
38
If the :ref:`database profiler level <set-profiling-level-level>` is
39
- ``0`` (i.e. :doc:`database profiler
39
+ ``0`` (specifically, :doc:`database profiler
40
40
</tutorial/manage-the-database-profiler/>` is disabled), the
41
41
:ref:`slowms <set-profiling-level-options-slowms>` and
42
42
:ref:`sampleRate <set-profiling-level-options-sampleRate>`, affect
43
43
only the diagnostic log.
44
44
45
- (* Starting in MongoDB 4.0*): For a :binary:`~bin.mongos` instance,
46
- the method sets the ``slowms``, ``sampleRate`` and ``filter``
45
+ Starting in MongoDB 4.0, for a :binary:`~bin.mongos` instance, the
46
+ method sets the ``slowms``, ``sampleRate`` and ``filter``
47
47
configuration settings, which configure how operations get written to
48
48
the diagnostic log. You cannot enable the
49
49
:doc:`/tutorial/manage-the-database-profiler` on a
@@ -62,6 +62,8 @@ Definition
62
62
:method:`db.setProfilingLevel()` provides a wrapper around the
63
63
:dbcommand:`profile` command.
64
64
65
+ .. include:: /includes/log-changes-to-database-profiler.rst
66
+
65
67
Syntax
66
68
~~~~~~
67
69
@@ -97,7 +99,7 @@ Parameters
97
99
98
100
.. include:: /includes/database-profiler-levels.rst
99
101
100
- Since profiling is not available on :binary:`~bin.mongos`,
102
+ Because profiling is not available on :binary:`~bin.mongos`,
101
103
:method:`db.setProfilingLevel()` cannot be used to set the profiling
102
104
level to a value other than ``0`` on a :binary:`~bin.mongos` instance.
103
105
@@ -128,9 +130,9 @@ Parameters
128
130
For :binary:`~bin.mongod` instances, the setting affects both the
129
131
diagnostic log and, if enabled, the profiler.
130
132
131
- For :binary:`~bin.mongos` instances, the setting affects the
132
- diagnostic log only and not the profiler since profiling is not
133
- available on :binary:`~bin.mongos`.
133
+ For :binary:`~bin.mongos` instances, the setting affects
134
+ the diagnostic log only and not the profiler because
135
+ profiling is not available on :binary:`~bin.mongos`.
134
136
135
137
.. note::
136
138
This argument affects the same setting as the configuration
@@ -149,9 +151,9 @@ Parameters
149
151
For :binary:`~bin.mongod` instances, the setting affects both the
150
152
diagnostic log and, if enabled, the profiler.
151
153
152
- For :binary:`~bin.mongos` instances, the setting affects the
153
- diagnostic log only and not the profiler since profiling is not
154
- available on :binary:`~bin.mongos`.
154
+ For :binary:`~bin.mongos` instances, the setting affects
155
+ the diagnostic log only and not the profiler because
156
+ profiling is not available on :binary:`~bin.mongos`.
155
157
156
158
.. note::
157
159
This argument affects the same setting as the configuration option
@@ -170,9 +172,9 @@ Parameters
170
172
For :binary:`~bin.mongod` instances, the setting affects both the
171
173
diagnostic log and, if enabled, the profiler.
172
174
173
- For :binary:`~bin.mongos` instances, the setting affects the
174
- diagnostic log only and not the profiler since profiling is not
175
- available on :binary:`~bin.mongos`.
175
+ For :binary:`~bin.mongos` instances, the setting affects
176
+ the diagnostic log only and not the profiler because
177
+ profiling is not available on :binary:`~bin.mongos`.
176
178
177
179
For an example of a filter used to control logged
178
180
operations, see :ref:`profiler-filter-example`.
0 commit comments