[SERVER-72583] Make the mongo shell have the same default minimum logged severity as mongod/s Created: 06/Jan/23 Updated: 13/Mar/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | George Wangensteen | Assignee: | Backlog - Security Team |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Server Security
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
Currently, the minimum severity the shell logs is "info" by default (https://github.com/mongodb/mongo/blob/fc021de4af28a6171e0eea8f5311268c5491876a/src/mongo/shell/shell_options.cpp#L117-L122) while the server processes (mongod, s, q, etc) have "log" as the minimum severity they log by default (see https://github.com/mongodb/mongo/blob/fc021de4af28a6171e0eea8f5311268c5491876a/src/mongo/logv2/log_component_settings.cpp#L39). Although they have the same logged message and output format (see https://jira.mongodb.org/browse/SERVER-49745), INFO and LOG are subtly different severities, so this distinction means that it is easy to accidentally log an important log line that shows up by default in servers but not in the shell - this happened with stacktraces in https://jira.mongodb.org/browse/SERVER-72582 . Can we consider making the shell and servers have the same default minimum log severity? |
| Comments |
| Comment by Andy Schwerin [ 06/Jan/23 ] |
|
Now that the old C++ shell is only used as part of the MongoDB testing framework, this request seems viable. It will be important to make sure that any new logging done by the shell is well-formatted for processing of test output by people and programs. Do MongoDB developers still use this shell interactively on a regular basis? That might be the other thing to look out for, as the logging by background jobs like the RSM could be annoying to them. Perhaps a flag to let them change the logging level when using the shell interactively would be helpful. Perhaps not. |