diff options
author | Benety Goh <benety@mongodb.com> | 2014-06-02 17:41:41 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2014-06-04 14:50:40 -0400 |
commit | dd0469332e0777e366cb4d4d75dce2c52ab7164a (patch) | |
tree | 0b05ffb4d7bd81d794143249658f308e5534ab3b /src/mongo/db | |
parent | db53ec323146c5b2be95a209ecc166772772323a (diff) | |
download | mongo-dd0469332e0777e366cb4d4d75dce2c52ab7164a.tar.gz |
SERVER-14114 logging cleanup - removed problem()
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/catalog/index_catalog.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/index/btree_based_access_method.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/instance.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/ops/delete_executor.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/master_slave.cpp | 22 | ||||
-rw-r--r-- | src/mongo/db/structure/btree/btree_logic.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/structure/record_store_v1_simple.cpp | 2 |
7 files changed, 22 insertions, 22 deletions
diff --git a/src/mongo/db/catalog/index_catalog.cpp b/src/mongo/db/catalog/index_catalog.cpp index 9cbf7e201b5..fac5d42bab9 100644 --- a/src/mongo/db/catalog/index_catalog.cpp +++ b/src/mongo/db/catalog/index_catalog.cpp @@ -1022,9 +1022,9 @@ namespace mongo { Status status = index->accessMethod()->remove(txn, obj, loc, options, &removed); if ( !status.isOK() ) { - problem() << "Couldn't unindex record " << obj.toString() - << " from collection " << _collection->ns() - << ". Status: " << status.toString(); + log() << "Couldn't unindex record " << obj.toString() + << " from collection " << _collection->ns() + << ". Status: " << status.toString(); } return Status::OK(); diff --git a/src/mongo/db/index/btree_based_access_method.cpp b/src/mongo/db/index/btree_based_access_method.cpp index 50287a9aadb..4b913ee1d7d 100644 --- a/src/mongo/db/index/btree_based_access_method.cpp +++ b/src/mongo/db/index/btree_based_access_method.cpp @@ -146,8 +146,8 @@ namespace mongo { try { ret = _newInterface->unindex(txn, key, loc); } catch (AssertionException& e) { - problem() << "Assertion failure: _unindex failed " - << _descriptor->indexNamespace() << endl; + log() << "Assertion failure: _unindex failed " + << _descriptor->indexNamespace() << endl; out() << "Assertion failure: _unindex failed: " << e.what() << '\n'; out() << " key:" << key.toString() << '\n'; out() << " dl:" << loc.toString() << endl; diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp index 457ebc471dd..9c104746f72 100644 --- a/src/mongo/db/instance.cpp +++ b/src/mongo/db/instance.cpp @@ -1347,7 +1347,7 @@ namespace { string name = ss.str(); f = new ofstream(name.c_str(), ios::out | ios::binary); if ( ! f->good() ) { - problem() << "diagLogging couldn't open " << name << endl; + log() << "diagLogging couldn't open " << name << endl; // todo what is this? : throw 1717; } diff --git a/src/mongo/db/ops/delete_executor.cpp b/src/mongo/db/ops/delete_executor.cpp index 69359defd60..facf815d3b8 100644 --- a/src/mongo/db/ops/delete_executor.cpp +++ b/src/mongo/db/ops/delete_executor.cpp @@ -153,8 +153,8 @@ namespace mongo { if (logop) { if ( toDelete.isEmpty() ) { - problem() << "Deleted object without id in collection " << collection->ns() - << ", not logging."; + log() << "Deleted object without id in collection " << collection->ns() + << ", not logging."; } else { bool replJustOne = true; diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp index 4cdbecc4ae7..820a042c498 100644 --- a/src/mongo/db/repl/master_slave.cpp +++ b/src/mongo/db/repl/master_slave.cpp @@ -414,7 +414,7 @@ namespace repl { return; } else { - problem() << "resync of " << db << " from " << hostName << " failed " << errmsg << endl; + log() << "resync of " << db << " from " << hostName << " failed " << errmsg << endl; throw SyncException(); } } @@ -570,12 +570,12 @@ namespace repl { nsToDatabase(ns, clientName); if ( *ns == '.' ) { - problem() << "skipping bad op in oplog: " << op.toString() << endl; + log() << "skipping bad op in oplog: " << op.toString() << endl; return; } else if ( *ns == 0 ) { /*if( op.getStringField("op")[0] != 'n' )*/ { - problem() << "halting replication, bad op in oplog:\n " << op.toString() << endl; + log() << "halting replication, bad op in oplog:\n " << op.toString() << endl; replAllDead = "bad object in oplog"; throw SyncException(); } @@ -803,7 +803,7 @@ namespace repl { } if( !oplogReader.haveCursor() ) { - problem() << "repl: dbclient::query returns null (conn closed?)" << endl; + log() << "repl: dbclient::query returns null (conn closed?)" << endl; oplogReader.resetConnection(); return -1; } @@ -846,16 +846,16 @@ namespace repl { if ( !err.empty() ) { // 13051 is "tailable cursor requested on non capped collection" if (op.getIntField("code") == 13051) { - problem() << "trying to slave off of a non-master" << '\n'; + log() << "trying to slave off of a non-master" << '\n'; massert( 13344 , "trying to slave off of a non-master", false ); } else { - problem() << "repl: $err reading remote oplog: " + err << '\n'; + log() << "repl: $err reading remote oplog: " + err << '\n'; massert( 10390 , "got $err reading remote oplog", false ); } } else { - problem() << "repl: bad object read from remote oplog: " << op.toString() << '\n'; + log() << "repl: bad object read from remote oplog: " << op.toString() << '\n'; massert( 10391 , "repl: bad object read from remote oplog", false); } } @@ -1223,16 +1223,16 @@ namespace repl { } catch ( AssertionException& ) { ReplInfo r("Assertion in replSlaveThread(): sleeping 5 minutes before retry"); - problem() << "Assertion in replSlaveThread(): sleeping 5 minutes before retry" << endl; + log() << "Assertion in replSlaveThread(): sleeping 5 minutes before retry" << endl; sleepsecs(300); } catch ( DBException& e ) { - problem() << "exception in replSlaveThread(): " << e.what() - << ", sleeping 5 minutes before retry" << endl; + log() << "exception in replSlaveThread(): " << e.what() + << ", sleeping 5 minutes before retry" << endl; sleepsecs(300); } catch ( ... ) { - problem() << "error in replSlaveThread(): sleeping 5 minutes before retry" << endl; + log() << "error in replSlaveThread(): sleeping 5 minutes before retry" << endl; sleepsecs(300); } } diff --git a/src/mongo/db/structure/btree/btree_logic.cpp b/src/mongo/db/structure/btree/btree_logic.cpp index e8a2245cba6..5d54544fc05 100644 --- a/src/mongo/db/structure/btree/btree_logic.cpp +++ b/src/mongo/db/structure/btree/btree_logic.cpp @@ -69,7 +69,7 @@ namespace mongo { string msg = str::stream() << "Btree::insert: key too large to index, failing " << _logic->_indexName << ' ' << key->dataSize() << ' ' << key->toString(); - problem() << msg << endl; + log() << msg << endl; return Status(ErrorCodes::KeyTooLong, msg); } @@ -2163,7 +2163,7 @@ namespace mongo { int z = k1.data.woCompare(k2.data, ordering); //wassert( z <= 0 ); if (z > 0) { - problem() << "Btree keys out of order in collection " << ns; + log() << "Btree keys out of order in collection " << ns; ONCE { dumpBucket(bucket); } diff --git a/src/mongo/db/structure/record_store_v1_simple.cpp b/src/mongo/db/structure/record_store_v1_simple.cpp index da502bf0c66..d9747d4ed55 100644 --- a/src/mongo/db/structure/record_store_v1_simple.cpp +++ b/src/mongo/db/structure/record_store_v1_simple.cpp @@ -104,7 +104,7 @@ namespace mongo { << ", link number " << chain << ", invalid link is " << cur.toString() << ", throwing Fatal Assertion"; - problem() << sb.str() << endl; + log() << sb.str() << endl; fassertFailed(16469); } } |