Retrieve Compass Logs
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.
View Compass Logs
2
Compass Log Location
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 |
Log File Format
Compass outputs log messages in structured JSON format. The messages are written in the same format used for MongoDB server logs.
Log Retention
Compass retains log files for 30 days. Log files older than 30 days are automatically deleted.