mongodb/mongo-php-driver — pull request #218 by derickr (2012-11-14 11:55:49+00:00)
Title: Modified MongoLog's user callback to include a textual description of level and module.

Having to do this myself all the time with:

MongoLog::setModule( MongoLog::ALL );
MongoLog::setLevel( MongoLog::ALL );
set_error_handler( 'foo' );
function foo( $a, $b ) { echo $b, "\n"; }

is really annoying, now I can just do:

MongoLog::setCallback( 'foo' );
function foo ( $a, $b, $c, $d, $e ) { printf("%-7s %-4s %s\n", $b, $d, $e); } );

And don't see other PHP notices/warnings through that either.

I'm wondering whether to add a nice:

MongoLog::beNoisy( $module, $level );

as well...