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:
parent
db3f203d3f
commit
16ce34f241
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user