diff options
author | Judah Schvimer <judah@mongodb.com> | 2018-03-13 16:14:36 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2018-03-15 18:10:50 -0400 |
commit | 54dc55063a25fdcae65356c2515e55768181dc80 (patch) | |
tree | 8edb89269db75d4fcfc9b3d5d491157eef77dd23 /src/mongo/shell/utils.js | |
parent | 9374a420ac843e5eb4e7ff081469687dd3e2866a (diff) | |
download | mongo-54dc55063a25fdcae65356c2515e55768181dc80.tar.gz |
SERVER-33734 Improve jsTestLog filterability
Diffstat (limited to 'src/mongo/shell/utils.js')
-rw-r--r-- | src/mongo/shell/utils.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js index 6d130491b29..aabea87554f 100644 --- a/src/mongo/shell/utils.js +++ b/src/mongo/shell/utils.js @@ -304,7 +304,9 @@ setJsTestOption = function(name, value) { }; jsTestLog = function(msg) { - print("\n\n----\n" + msg + "\n----\n\n"); + assert.eq(typeof(msg), "string", "Received: " + msg); + const msgs = ["----", ...msg.split("\n"), "----"].map(s => `[jsTest] ${s}`); + print(`\n\n${msgs.join("\n")}\n\n`); }; jsTest = {}; |