PHPDeveloper.orghttp://www.phpdeveloper.org
Up-to-the Minute PHP News, views and communityen-usTue, 31 Mar 2015 15:48:38 -050030http://www.phpdeveloper.org/news/18873http://www.phpdeveloper.org/news/18873
Derick Rethans has a new post that the developers out there using MongoDB in their applications will find useful - a look at debugging your connections with the PHP driver (and what kind of information it can provide).

In a previous article I already mentioned that the 1.3 version of the MongoDB driver has improved logging functionality to aid with debugging connection issues. I've already briefly introduced MongoClient::getConnections(), but it provides a bit more information than I have already shown. The other improvement are changes to the MongoLog class.

He includes details on the information that comes back from the MongoDB "getConnections" call including the hash of the connection, the "last ping" time, connection type and a set of tags. He also shows how to enable the Mongolog logging, the levels of logging it allows and what kind of log messages you can expect it to output.