Docs Menu
Docs Home
/
MongoDB Compass
/

Retrieve Compass Logs

On this page

  • View Compass Logs
  • Compass Log Location
  • Log File Format
  • Log Retention

As part of normal operation, MongoDB Compass maintains a running log of events. Compass logs provide a history of operations and can help diagnose errors.

Note

MongoDB Compass redacts credentials from the logs.

1
2

Compass opens a dialog containing the location of your log file.

3

You can either:

  • Copy the path to the log file to your clipboard.

  • Open the folder containing your log file.

  • Extract the log file and view it as a text file.

Compass maintains one log file per session, compressed into a gzip archive file. The corresponding session ID is included in the log file name.

The directory where Compass writes logs depends on your operating system.

Operating System
Directory
macOS
~/.mongodb/compass/<LogID>_log.gz
Linux
~/.mongodb/compass/<LogID>_log.gz
Windows
%UserProfile%/AppData/Local/mongodb/compass/<LogID>_log.gz

Compass outputs log messages in structured JSON format. The messages are written in the same format used for MongoDB server logs.

Tip

See also:

To learn more about MongoDB logs and see examples, see Log Messages.

Compass retains log files for 30 days. Log files older than 30 days are automatically deleted.

Back

Troubleshooting

Next

Compass Connection Errors