Skip to content

Commit 7c49cde

Browse files
DOCSP-49593-update-getlogs-docs-to-include-mongos (#11874)
* DOCSP-49593-update-getlogs-docs-to-include-mongos * rephrase * rephrase * Update source/reference/command/getLog.txt Co-authored-by: Jeff Allen <[email protected]> * Update source/reference/command/getLog.txt Co-authored-by: Jeff Allen <[email protected]> * apply-feedback --------- Co-authored-by: Jeff Allen <[email protected]>
1 parent d7e4d82 commit 7c49cde

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

source/reference/command/getLog.txt

+12-10
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ Definition
1818

1919
.. dbcommand:: getLog
2020

21-
:dbcommand:`getLog` is an administrative command that returns the most
22-
recent 1024 logged :binary:`~bin.mongod` events. :dbcommand:`getLog` *does not*
23-
read log data from the :binary:`~bin.mongod` log file. It instead reads data
24-
from a RAM cache of logged :binary:`~bin.mongod` events. To run
25-
:dbcommand:`getLog`, use the :method:`db.adminCommand()` method.
21+
:dbcommand:`getLog` is an administrative command that returns the
22+
most recent 1024 logged events for a :binary:`~bin.mongod` or
23+
:binary:`~bin.mongos` instance. :dbcommand:`getLog` *does not*
24+
read log data from the log file. Instead, it reads data from a RAM
25+
cache of logged events from either :binary:`~bin.mongod` or
26+
:binary:`~bin.mongos`. To run :dbcommand:`getLog`, use the
27+
:method:`db.adminCommand()` method.
2628

2729
:dbcommand:`getLog` returns log data in escaped
2830
:ref:`Relaxed Extended JSON v2.0 <mongodb-extended-json-v2>` format.
@@ -74,7 +76,7 @@ The possible values for :dbcommand:`getLog` are:
7476
* - ``startupWarnings``
7577
- Returns log entries that *may* contain errors or warnings
7678
from MongoDB's log from when the current process started. If
77-
:binary:`~bin.mongod` started without warnings, this filter
79+
the process started without warnings, this filter
7880
may return an empty array.
7981

8082
.. note::
@@ -146,8 +148,8 @@ the MongoDB :option:`log file <mongod --logpath>`.
146148
.. note::
147149

148150
:dbcommand:`getLog` only shows the most recent 1024 logged
149-
:binary:`~bin.mongod` events, and is not a replacement for the
150-
MongoDB :option:`log file <mongod --logpath>`.
151+
events, and is not a replacement for the MongoDB
152+
:option:`log file <mongod --logpath>`.
151153

152154
Outside ``mongosh`` with ``jq``
153155
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -202,8 +204,8 @@ Retrieve Recent Events from Log
202204
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
203205

204206
The following operation, run from :binary:`~bin.mongosh`,
205-
retrieves the most recent ``global`` events for the
206-
:binary:`~bin.mongod`:
207+
retrieves the most recent ``global`` events for a
208+
:binary:`~bin.mongod` or :binary:`~bin.mongos` instance:
207209

208210
.. code-block:: javascript
209211

0 commit comments

Comments
 (0)