0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

better logging

This commit is contained in:
Kristina 2011-05-10 17:35:55 -04:00
parent 37e173b698
commit ff711f0d48
2 changed files with 6 additions and 3 deletions

View File

@ -472,7 +472,9 @@ namespace mongo {
_syncThread();
}
catch(DBException& e) {
sethbmsg("syncThread: " + e.toString() + ", last op: " + lastOpTimeWritten.toString());
sethbmsg(str::stream() << "syncThread: " << e.toString() <<
", try 'use local; db.oplog.rs.findOne({ts : {$gt : new Timestamp(" <<
lastOpTimeWritten.getSecs() << "000," << lastOpTimeWritten.getInc() << ")});' on the primary");
sleepsecs(10);
}
catch(...) {
@ -487,9 +489,7 @@ namespace mongo {
member has done a stepDown() and needs to come back up.
*/
OCCASIONALLY {
log() << "replSet running manager" << rsLog;
mgr->send( boost::bind(&Manager::msgCheckNewState, theReplSet->mgr) );
log() << "replSet manager finished" << rsLog;
}
}
}

View File

@ -46,6 +46,9 @@ namespace mongo {
unsigned getSecs() const {
return secs;
}
unsigned getInc() const {
return i;
}
OpTime(Date_t date) {
reinterpret_cast<unsigned long long&>(*this) = date.millis;
}