microphork / package-debug
A simple debugging package for the microphork framework
Installs: 160
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:microphork-package
Requires
This package is not auto-updated.
Last update: 2021-12-25 01:24:07 UTC
README
This is a simple debugging package for the microphork framework. The debug class is a dispatcher. The display
handler outputs the debugging data and the log
handler logs it to a file.
To extend this package create a \Phork\App\Debug
class in the app/classes
folder and an app/config/debug.php
file to define the active handler(s).
Usage
//load and initialize a new debug package
$class = \Phork::instance()->initPackage('Debug');
$debug = new $class();
//get the loaded config
$config = \Phork::config()->get('debug');
//initialize the debug handler
if ($config->handlers && $handlers = $config->handlers->export()) {
$debug->init($handlers);
}
//send some debugging data
$debug->log('this', 'will', 'be', 'concatenated');
Credits
Built by Elenor at Phork Labs.
License
Licensed under The MIT License http://www.opensource.org/licenses/mit-license.php