diff options
Diffstat (limited to 'src/mongo/shell/utils.js')
| -rw-r--r-- | src/mongo/shell/utils.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js index ec5e7b92305..abfe6cce8de 100644 --- a/src/mongo/shell/utils.js +++ b/src/mongo/shell/utils.js @@ -194,6 +194,15 @@ shellPrint = function(x) { shellPrintHelper(x); }; +_originalPrint = print; +disablePrint = function() { + print = Function.prototype; +}; + +enablePrint = function() { + print = _originalPrint; +}; + print.captureAllOutput = function(fn, args) { var res = {}; res.output = []; |
