Debugging Server-side applications can be a time-consuming task and I guess all PHP developer know this frustrating search for bugs, using “raw” debug messages like:
echo "<br>1"; print_r($myArray) ...
Thanks to the great Firebug extension for Firefox, a lot of web-development tasks have become easier. Now, its getting even better! Introducing the FirePHP extension for BIGACE lets you send all BIGACE and PHP related log messages to the Firebug console.
Get all downloads from:
Read how to configure the logger class. After configuration and reloading the page you will find your log messages in the console like this:
If you develop your own modules or other BIGACE extensions, you can use the following PHP code to log messages:
$GLOBALS['LOGGER']->logError('This is a simple test to demonstrate a FirePHP error'); $GLOBALS['LOGGER']->logInfo('A demonstration of a FirePHP warning'); $GLOBALS['LOGGER']->logDebug('Another message, to demonstrate a FirePHP info');
Or you use one of the FirePHP constants for logging directly:
$GLOBALS['LOGGER']->log(FirePHP::TRACE, 'The Trace level is mega useful!');
This is the result of the TRACE log:
Obviously, you can read it better in the console than in that resized screenshot ;)
And here are all available log levels:
class FirePHP { const LOG = 'LOG'; const INFO = 'INFO'; const WARN = 'WARN'; const ERROR = 'ERROR'; const DUMP = 'DUMP'; const TRACE = 'TRACE'; const EXCEPTION = 'EXCEPTION'; const TABLE = 'TABLE'; ... }
There are many more options available, please refer to the official QuickStart docu.
If you are interested in more information about FirePHP, please visit their homepage at http://www.firephp.org/.
A great framework, thanks to its developer Christoph Dorn. Oh and BTW, FirePHP is licensed with “New BSD License”.