summaryrefslogtreecommitdiff
path: root/shell/mongo.js
diff options
context:
space:
mode:
Diffstat (limited to 'shell/mongo.js')
-rw-r--r--shell/mongo.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/shell/mongo.js b/shell/mongo.js
index e129784..2535769 100644
--- a/shell/mongo.js
+++ b/shell/mongo.js
@@ -24,8 +24,9 @@ if ( typeof mongoInject == "function" ){
mongoInject( Mongo.prototype );
}
-Mongo.prototype.setSlaveOk = function() {
- this.slaveOk = true;
+Mongo.prototype.setSlaveOk = function( value ) {
+ if( value == undefined ) value = true
+ this.slaveOk = value
}
Mongo.prototype.getDB = function( name ){
@@ -43,6 +44,10 @@ Mongo.prototype.adminCommand = function( cmd ){
return this.getDB( "admin" ).runCommand( cmd );
}
+Mongo.prototype.setLogLevel = function( logLevel ){
+ return this.adminCommand({ setParameter : 1, logLevel : logLevel })
+}
+
Mongo.prototype.getDBNames = function(){
return this.getDBs().databases.map(
function(z){