print log

master
wangyuan 2019-08-16 14:05:33 +08:00
parent e3550c6357
commit 06d25b00a2
1 changed files with 5 additions and 0 deletions

View File

@ -74,7 +74,12 @@ public class MyMongoDBPool {
}
private DBObject findOne2(String collectionName, Object id) throws Exception {
LOGGER.info("the collection={},id={}",collectionName,id);
DBCollection coll = db.getCollection(collectionName);
if(coll == null){
LOGGER.info("the collection={},id={} is null",collectionName,id);
return null;
}
return coll.findOne(id.toString());
}