diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-08-25 16:10:31 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-09-15 14:18:42 -0400 |
commit | eb06f746735b5726f46bf4b3af6c5ad29ba10106 (patch) | |
tree | eefa1a43d8d2b08d05772997c95b395121f34ac5 | |
parent | ce4693ad09f8d8ae4a86d0c2b2f200bca07f37d4 (diff) | |
download | mongo-eb06f746735b5726f46bf4b3af6c5ad29ba10106.tar.gz |
some log cleaning
-rw-r--r-- | db/client.cpp | 6 | ||||
-rw-r--r-- | util/log.h | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/db/client.cpp b/db/client.cpp index 5be217cf358..f1d6bf6bfcd 100644 --- a/db/client.cpp +++ b/db/client.cpp @@ -56,9 +56,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 ){ @@ -75,7 +75,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/util/log.h b/util/log.h index 1f11c81cff5..e0147a02761 100644 --- a/util/log.h +++ b/util/log.h @@ -295,10 +295,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 */ |