-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Security
-
ALL
Currently, if a stacktrace should be emitted from the mongo shell (i.e. user uses "printStackTrace"; an invariant fails, etc), nothing is emitted to the log.
I think this is because stacktraces are logged with severity Log() (https://github.com/mongodb/mongo/blob/8fd187d1f0c32a4d2fbf720e7f8c37b392c013b2/src/mongo/util/stacktrace.cpp#L103) to a backend that has filter for threshold Log (https://github.com/mongodb/mongo/blob/8fd187d1f0c32a4d2fbf720e7f8c37b392c013b2/src/mongo/logv2/log_domain_global.cpp#L205) , but the Shell uses LogSeverity::Info as the minimum severity it logs when not in verbose mode (https://github.com/mongodb/mongo/blob/fc021de4af28a6171e0eea8f5311268c5491876a/src/mongo/shell/shell_options.cpp#L117-L122) . Since "Info" is more severe than "Log", this means stacktraces are not logged when crashes happen / invariants fail in the shell.
- is related to
-
SERVER-72583 Make the mongo shell have the same default minimum logged severity as mongod/s
- Backlog