News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

ThinkPHP Blog:
MySQLnd Plugins Writing a MySQL Query Logger in PHP
August 18, 2010 @ 11:10:15

On the ThinkPHP blog there's a recent post looking at writing a query logger in PHP as a mysqlnd plugin using the mysqlnd_uh extension.

A new approach to implementing a query logger and potentially more complex features such as monitoring or read/write-splitting is the MySQLnd Userland Handler Extension (mysqlnd_uh, pecl website). The extension lets you register a PHP class as a proxy for every MySQLnd connection. Every call to a function to MySQLnd (usually indirect through mysqli, mysql, pdo_mysql) is passed to the PHP class, which then calls the original MySQLnd function.

They give a simple example to start - a logging function and how to configure it - followed by a more real-world scenario of logging inside of a project plugin.

0 comments voice your opinion now!
mysqlnd query logger plugin extension


blog comments powered by Disqus

Similar Posts

Internet Super Hero Blog: Compiling mysqlnd with PHP 5.2/5.3/6.0

Johannes Schlüter's Blog: Symfony 2 and mysqlnd

ThinkPHP Blog: Mayflower Barcamp: Developing a PHP extension for Skype

Ulf Wendel's Blog: PHP mysqlnd query cache plugin quickstart is online!

PHP Thinktank Blog: IRC Discussions - Standard PHP Library


Community Events





Don't see your event here?
Let us know!


code interview series introduction community podcast symfony language release tips zendserver threedevsandamaybe framework bugfix laravel conference api deployment voicesoftheelephpant list

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework