Skip to content

Commit 656ec72

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-47538-log-path-and-id (#395)
* DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id * DOCSP-47538-log-path-and-id --------- Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 045bda6 commit 656ec72

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

source/includes/log-file-location.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Starting in |mdb-shell| 2.4.0, you can use the ``log.getPath()``
2+
command to view the current log file location. For example:
3+
4+
.. code-block:: javascript
5+
6+
log.getPath()
7+
8+
Example output:
9+
10+
.. code-block:: javascript
11+
:copyable: false
12+
13+
/Users/jane.doe/.mongodb/mongosh/c2961dbd6b73b052671d9df0_log
14+
15+
The hexadecimal value in the path is the |mdb-shell| log identifier for
16+
the current session.

source/logs/location.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ To view the current log file location, use the :ref:`config API
3737
After you modify your log file location, you must start a new
3838
|mdb-shell| session for the change to take effect.
3939

40+
Log File Location
41+
~~~~~~~~~~~~~~~~~
42+
43+
.. include:: /includes/log-file-location.rst
44+
4045
Log File Names
4146
~~~~~~~~~~~~~~
4247

source/logs/view.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ depends on your operating system.
1919

2020
To change where MongoDB Shell writes logs, see
2121
:ref:`mongosh-log-location`.
22+
23+
.. include:: /includes/log-file-location.rst

0 commit comments

Comments
 (0)