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

Bug fix: logChange() does't throw (can be called from destructors

This commit is contained in:
Alberto Lerner 2010-08-16 11:09:03 -04:00
parent db3f203d3f
commit 16ce34f241

View File

@ -653,7 +653,13 @@ namespace mongo {
BSONObj msg = BSON( "_id" << id.str() << "server" << getHostNameCached() << "time" << DATENOW <<
"what" << what << "ns" << ns << "details" << detail );
log() << "config change: " << msg << endl;
try {
conn->insert( "config.changelog" , msg );
}
catch ( std::exception& e ){
log() << "not logging config change: " << e.what() << endl;
}
conn.done();
}