summaryrefslogtreecommitdiff
path: root/src/mongo/scripting
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2019-12-04 22:38:37 +0000
committerevergreen <evergreen@mongodb.com>2019-12-04 22:38:37 +0000
commit42655faaf32bceaca1f77a3d79a1eac3d10b9b09 (patch)
tree9616c9f72c1514772953afc75008adaf24d3c28c /src/mongo/scripting
parent0ac857c06f5a2f210f0ce102bf8c71763cf0b358 (diff)
downloadmongo-42655faaf32bceaca1f77a3d79a1eac3d10b9b09.tar.gz
SERVER-43998 ProgramOutputMultiplexer::appendLine should write to the logger
Diffstat (limited to 'src/mongo/scripting')
-rw-r--r--src/mongo/scripting/mozjs/global.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/scripting/mozjs/global.cpp b/src/mongo/scripting/mozjs/global.cpp
index 097f16417a1..6492de06a04 100644
--- a/src/mongo/scripting/mozjs/global.cpp
+++ b/src/mongo/scripting/mozjs/global.cpp
@@ -61,12 +61,13 @@ const char* const GlobalInfo::className = "Global";
namespace {
-logger::MessageLogDomain* jsPrintLogDomain;
+logger::MessageLogDomain* plainShellOutputDomain;
} // namespace
void GlobalInfo::Functions::print::call(JSContext* cx, JS::CallArgs args) {
- logger::LogstreamBuilder builder(jsPrintLogDomain, getThreadName(), logger::LogSeverity::Log());
+ logger::LogstreamBuilder builder(
+ plainShellOutputDomain, getThreadName(), logger::LogSeverity::Log());
std::ostream& ss = builder.stream();
bool first = true;
@@ -125,8 +126,8 @@ void GlobalInfo::Functions::sleep::call(JSContext* cx, JS::CallArgs args) {
args.rval().setUndefined();
}
-MONGO_INITIALIZER(JavascriptPrintDomain)(InitializerContext*) {
- jsPrintLogDomain = logger::globalLogManager()->getNamedDomain("javascriptOutput");
+MONGO_INITIALIZER(PlainShellOutputDomain)(InitializerContext*) {
+ plainShellOutputDomain = logger::globalLogManager()->getNamedDomain("plainShellOutput");
return Status::OK();
}