summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/mongo_vstudio.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/shell/mongo_vstudio.cpp b/shell/mongo_vstudio.cpp
index 991e29636bf..5677297cb48 100644
--- a/shell/mongo_vstudio.cpp
+++ b/shell/mongo_vstudio.cpp
@@ -2570,8 +2570,9 @@ const StringData _jscode_raw_mongo =
"mongoInject( Mongo.prototype );\n"
"}\n"
"\n"
-"Mongo.prototype.setSlaveOk = function() {\n"
-"this.slaveOk = true;\n"
+"Mongo.prototype.setSlaveOk = function( value ) {\n"
+"if( value == undefined ) value = true\n"
+"this.slaveOk = value\n"
"}\n"
"\n"
"Mongo.prototype.getDB = function( name ){\n"
@@ -2589,6 +2590,10 @@ const StringData _jscode_raw_mongo =
"return this.getDB( \"admin\" ).runCommand( cmd );\n"
"}\n"
"\n"
+"Mongo.prototype.setLogLevel = function( logLevel ){\n"
+"return this.adminCommand({ setParameter : 1, logLevel : logLevel })\n"
+"}\n"
+"\n"
"Mongo.prototype.getDBNames = function(){\n"
"return this.getDBs().databases.map(\n"
"function(z){\n"