diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2019-11-25 22:16:49 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-25 22:16:49 +0000 |
commit | a29cb7d084afa62772776fc2b58efb1df91c535f (patch) | |
tree | 4d75bc806f223b843f5f751936b53079d3c09896 /src/mongo/shell | |
parent | bd31dd168c29d5aaa5ae2822f5673eff7a2850d7 (diff) | |
download | mongo-a29cb7d084afa62772776fc2b58efb1df91c535f.tar.gz |
SERVER-44142 correctly utilize LogSeverity in logv2
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/dbshell.cpp | 2 | ||||
-rw-r--r-- | src/mongo/shell/shell_options.cpp | 4 | ||||
-rw-r--r-- | src/mongo/shell/shell_options.h | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp index eca95ae9f92..3e59edfbfb1 100644 --- a/src/mongo/shell/dbshell.cpp +++ b/src/mongo/shell/dbshell.cpp @@ -749,7 +749,7 @@ int _main(int argc, char* argv[], char** envp) { if (!mongo::serverGlobalParams.quiet.load()) std::cout << mongoShellVersion(VersionInfoInterface::instance()) << std::endl; - if (!shellGlobalParams.logV2) { + if (!logV2Enabled()) { logger::globalLogManager() ->getNamedDomain("javascriptOutput") ->attachAppender(std::make_unique<ShellConsoleAppender>( diff --git a/src/mongo/shell/shell_options.cpp b/src/mongo/shell/shell_options.cpp index 2441ff9ce45..7f0766c3496 100644 --- a/src/mongo/shell/shell_options.cpp +++ b/src/mongo/shell/shell_options.cpp @@ -109,7 +109,7 @@ Status storeMongoShellOptions(const moe::Environment& params, } if (params.count("verbose")) { - logger::globalLogDomain()->setMinimumLoggedSeverity(logger::LogSeverity::Debug(1)); + setMinimumLoggedSeverity(logger::LogSeverity::Debug(1)); } // `objcheck` option is part of `serverGlobalParams` to avoid making common parts depend upon @@ -338,7 +338,7 @@ Status storeMongoShellOptions(const moe::Environment& params, } if (params.count("logv2")) { - shellGlobalParams.logV2 = true; + logV2Set(true); } return Status::OK(); diff --git a/src/mongo/shell/shell_options.h b/src/mongo/shell/shell_options.h index 2868998197f..45ac4e55455 100644 --- a/src/mongo/shell/shell_options.h +++ b/src/mongo/shell/shell_options.h @@ -81,8 +81,6 @@ struct ShellGlobalParams { int jsHeapLimitMB = 0; bool nokillop = false; Seconds idleSessionTimeout = Seconds{0}; - - bool logV2 = false; }; extern ShellGlobalParams shellGlobalParams; |