MongoDB Shell
7 results found
-
Control logging behavior of mongosh
It should be possible to control the logging behavior of mongosh, for example:
- verbosity
- what to log / log level
- retention time
- whether logging is enabled or not
27 votesHi all, based on your feedback, I'm excited to announce the latest round of logging enhancements we've made in mongosh, available starting mongosh v2.4.0:
- Disable logging altogether: https://www.mongodb.com/docs/mongodb-shell/logs/disable/#std-label-mongosh-logs-disable
- Specify a custom log file location: https://www.mongodb.com/docs/mongodb-shell/logs/location/#std-label-mongosh-log-location
- Enable log compression: https://www.mongodb.com/docs/mongodb-shell/logs/compression/#std-label-mongosh-log-compression
- Specify maximum log storage size: https://www.mongodb.com/docs/mongodb-shell/logs/retention/size/#std-label-mongosh-log-retention-gb
- Modify maximum log file count: https://www.mongodb.com/docs/mongodb-shell/logs/retention/size/#std-label-mongosh-log-retention-gb
- Modify log retention duration: https://www.mongodb.com/docs/mongodb-shell/logs/retention/size/#std-label-mongosh-log-retention-gb
- Ability to write custom log entries: https://www.mongodb.com/docs/mongodb-shell/logs/custom-entries/#std-label-mongosh-custom-log-entries
You can download the latest version of mongosh from the download center: https://www.mongodb.com/try/download/shell. Please let us know if you have any additional feedback!
-
Vi mode for MongoDB Shell
Please enable a 'vi' editing mode for the mongo shell.
- Similar to vi mode in bash
- Similar to https://www.npmjs.com/package/mongovi
A first cut of key bindings would be:
Basic command mode/editing mode toggling:
i Insert before cursor
Esc Toggle to command modeCursor motion keys:
h Move left
j Move down
k Move up
l Move rightw Move to next word
b Move to the beginning of the word0 Move to the beginning of the line
$ Move to the end of the lineAnd delete/change:
x delete next character to the right
d{motion} delete amount specified by…
11 votes -
Support .mongorc.js file
A core bit of functionality from the original shell is to support reading from the
.mongorc.js
file in a user's home directory. This feels like core functionality thatmongosh
should support.4 votesThis is available in mongosh 0.10.0+
-
Bracket matching and highlighting
Something which I miss from the legacy shell is bracket matching and highlighting, so I can tell when I have too many brackets, or they're in the wrong order
3 votesThis is available starting in version 0.15.5
-
Mongosh connection string thourgh proxy
Greetings,
I need to create a proxy host in my environment so that ALL traffic between client <->Mongo Atlas goes through ONE single host.
Problem is that if I usemongodb+srv://server.example.com/
It returns me one of 50 endpoints to my Atlas cluster.I need something like: connect to this cluster, BUT use this proxy hop server.
1 vote -
Control-C to cancel current execution only - without exiting from mongo shell
when you started some complex query and realized that it could take time - you want to cancel it. if you press Control-C you will be kicked out of mongo shell. so you have to login back and switch to proper database; probably, set all variables again etc.
there should be option to cancel just current execution leaving you in current session.
1 voteThis is available in mongosh 0.13.1+. When you do Ctrl-C, the shell will attempt to cleanly kill the operation on the server and get you back to the prompt right away.
-
Add history search
Add ability to search through the command history using Cmd/Ctrl+R. It would be nice to also being able to search through the scripts entered with
.editor
1 vote
- Don't see your idea?