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
We have begun working on this feature request.
-
Luis Alberto commented
We are having problems with the Mongo Shell tool's logs, now it is impacting us as the operating system is running out of space. It should be possible to control the amount and location of logging. Please fix.
-
Felicia commented
As a workaround, one way is to remove write permissions to the mongosh directory with "chmod 500 <directory>" or equivalent.
Another is to run a cron job to periodically remove files ending in _log in that directory. -
Danilo commented
In some cases, it's very important to us to be able di disable any log.
-
Ivan Pakaliuk commented
"mongosh retains log files for 30 days. Log files older than 30 days are automatically deleted."
I would like to control the number of days, for it is critical.
-
Marina commented
We will have to make provisions to deal with the level of verbosity of the mongosh. It should be possible to control the amount and location of logging. Please fix.
-
Nimish commented
The current logging verbosity is very high. We are constantly in the danger of running out of disk space due to the mongosh log stored in the user's home directory. The only solution we have currently is to set up a corn job to delete logs every hour. Please fix this.
-
Devon commented
we use mongosh as part of our application deployment process where we checkout release-specific artifacts from source code control, build a "work file (.js)" of all changes for the release, then execute that script by piping it into the mongosh. We are not able to retrieve commands or return results of the commands indicating success/failure. Instead, we see something like:
Atlas [mongos] test> myDB
Atlas [mongos] myDB> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Atlas [mongos] myDB> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Atlas [mongos] myDB> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Atlas [mongos] myDB> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Atlas [mongos] myDB>
Atlas [mongos] myDB> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...More control over command capture and result verbosity is critical to determining success/failure of a deployment.