diff options
-rw-r--r-- | db/client.cpp | 6 | ||||
-rw-r--r-- | shell/mongo_vstudio.cpp | 4 | ||||
-rw-r--r-- | util/log.h | 9 |
3 files changed, 11 insertions, 8 deletions
diff --git a/db/client.cpp b/db/client.cpp index abbbc45c338..12275e4de4f 100644 --- a/db/client.cpp +++ b/db/client.cpp @@ -57,9 +57,9 @@ namespace mongo { _god = 0; if ( _context ) - cout << "ERROR: Client::~Client _context should be NULL: " << _desc << endl; + error() << "Client::~Client _context should be NULL: " << _desc << endl; if ( !_shutdown ) - cout << "ERROR: Client::shutdown not called: " << _desc << endl; + error() << "Client::shutdown not called: " << _desc << endl; } void Client::_dropns( const string& ns ){ @@ -76,7 +76,7 @@ namespace mongo { dropCollection( ns , err , b ); } catch ( ... ){ - log() << "error dropping temp collection: " << ns << endl; + warning() << "couldn't dropping temp collection: " << ns << endl; } } diff --git a/shell/mongo_vstudio.cpp b/shell/mongo_vstudio.cpp index e015986aca6..b25b7a790b4 100644 --- a/shell/mongo_vstudio.cpp +++ b/shell/mongo_vstudio.cpp @@ -1295,8 +1295,8 @@ const StringData _jscode_raw_utils = "}\n" "c.members.push(cfg);\n" "return db._adminCommand({ replSetReconfig: c });\n" -"};\n" -"rs.stepDown = function () { return db._adminCommand({ replSetStepDown:true}); };\n" +"}\n" +"rs.stepDown = function () { return db._adminCommand({ replSetStepDown:true}); }\n" "rs.addArb = function (hn) { return this.add(hn, true); }\n" "rs.conf = function () { return db.getSisterDB(\"local\").system.replset.findOne(); }\n" "\n" diff --git a/util/log.h b/util/log.h index ed3866a6467..20540aa98fb 100644 --- a/util/log.h +++ b/util/log.h @@ -302,10 +302,13 @@ namespace mongo { inline Nullstream& log() { return Logstream::get().prolog(); } + + inline Nullstream& error() { + return log( LL_ERROR ); + } - /* TODOCONCURRENCY */ - inline ostream& stdcout() { - return cout; + inline Nullstream& warning() { + return log( LL_WARNING ); } /* default impl returns "" -- mongod overrides */ |