Skip to content

Commit a2845ca

Browse files
(DOCSP-18928): Compass logs (#386)
* (DOCSP-18928): Compass logs * formatting * word tweak * updates per copy review
1 parent 1dcf9b3 commit a2845ca

File tree

5 files changed

+112
-1
lines changed

5 files changed

+112
-1
lines changed

source/faq.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ data in the operating system's credentials API. For more information on
5151
how Keytar operates and the specific APIs it accesses, refer to the
5252
`Keytar Github documentation <https://github.com/atom/node-keytar>`_.
5353

54+
.. _compass-faq-logs:
55+
56+
Does Compass Maintain Logs?
57+
---------------------------
58+
59+
As part of normal operation, |compass| maintains a running log of
60+
events. |compass-short| logs provide a history of operations and can
61+
help diagnose errors. For more information on |compass-short| logs,
62+
including their format and location, see :ref:`compass-logs`.
63+
5464
.. _compass-faq-non-genuine:
5565

5666
Why am I seeing a warning about a non-genuine MongoDB server?
@@ -143,4 +153,3 @@ selected, |compass| is allowed to make requests to a third-party
143153
mapping service.
144154

145155
.. include:: /includes/fact-isolated-ver-third-party-mapping.rst
146-

source/release-notes.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ Bug Fixes:
135135

136136
New Features:
137137

138+
- Adds :ref:`client-side logging <compass-logs>` for |compass|
139+
operations.
140+
138141
- Improved |compass| startup time.
139142

140143
- Adds support for `MongoDB 5.1 features

source/troubleshooting.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Troubleshooting
77
This section provides advice for troubleshooting problems with
88
|compass|.
99

10+
:doc:`/troubleshooting/logs`
11+
Retrieve |compass| logs to diagnose errors.
12+
1013
:doc:`Connection Errors </troubleshooting/connection-errors>`
1114
Resolve issues with connecting |compass| to the MongoDB server.
1215

@@ -15,4 +18,6 @@ This section provides advice for troubleshooting problems with
1518
.. toctree::
1619
:titlesonly:
1720

21+
/troubleshooting/logs
1822
/troubleshooting/connection-errors
23+

source/troubleshooting/connection-errors.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Compass Connection Errors
1010
:depth: 1
1111
:class: singlecol
1212

13+
The sections on this page list common errors seen when connecting to
14+
|compass| and provide possible solutions.
15+
1316
MongoDB Not Running on the Provided Host and Port
1417
-------------------------------------------------
1518

@@ -334,6 +337,13 @@ Solutions
334337
- Verify that your selected authentication mechanism is supported by
335338
your MongoDB database.
336339

340+
Check the Compass Logs
341+
----------------------
342+
343+
The |compass-short| logs can provide additional information on
344+
connection errors. You may find more detailed error messages to help
345+
diagnose your issue. For more information, see :ref:`compass-logs`.
346+
337347
Additional Resources
338348
--------------------
339349

source/troubleshooting/logs.txt

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
.. _compass-logs:
2+
3+
=====================
4+
Retrieve Compass Logs
5+
=====================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
As part of normal operation, |compass| maintains a running log of
16+
events. |compass-short| logs provide a history of operations and can
17+
help diagnose errors.
18+
19+
.. note::
20+
21+
|compass| redacts credentials from the logs.
22+
23+
View Compass Logs
24+
-----------------
25+
26+
.. procedure::
27+
:style: normal
28+
29+
.. step:: In the |compass-short| top menu bar, click :guilabel:`Help`.
30+
31+
.. step:: In the :guilabel:`Help` menu, click :guilabel:`Open Log File`.
32+
33+
|compass-short| opens a dialog containing the location of your log file.
34+
35+
.. step:: Choose how to open the log file.
36+
37+
You can either:
38+
39+
- Copy the path to the log file to your clipboard.
40+
41+
- Open the folder containing your log file.
42+
43+
- Extract the log file and view it as a text file.
44+
45+
Compass Log Location
46+
--------------------
47+
48+
|compass-short| maintains one log file per session, compressed into a
49+
gzip archive file. The corresponding session ID is included in the log
50+
file name.
51+
52+
The directory where |compass-short| writes logs depends on your
53+
operating system.
54+
55+
.. list-table::
56+
:header-rows: 1
57+
:stub-columns: 1
58+
:widths: 10 20
59+
60+
* - Operating System
61+
- Directory
62+
* - macOS
63+
- ``~/.mongodb/compass/<LogID>_log.gz``
64+
* - Linux
65+
- ``~/.mongodb/compass/<LogID>_log.gz``
66+
* - Windows
67+
- ``%UserProfile%/AppData/Local/mongodb/compass/<LogID>_log.gz``
68+
69+
Log File Format
70+
---------------
71+
72+
|compass-short| outputs log messages in structured JSON format. The
73+
messages are written in the same format used for MongoDB server logs.
74+
75+
.. seealso::
76+
77+
To learn more about MongoDB logs and see examples, see
78+
:ref:`log-messages-ref`.
79+
80+
Log Retention
81+
-------------
82+
83+
|compass-short| retains log files for 30 days. Log files older than 30
84+
days are automatically deleted.

0 commit comments

Comments
 (0)