12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
- set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/extlib/FirePHP/lib');
- class FirePHPPlugin extends Plugin
- {
- private $firephp;
- function onInitializePlugin()
- {
-
- ob_start();
- require_once('FirePHPCore/FirePHP.class.php');
- $this->firephp = FirePHP::getInstance(true);
- }
- function onStartLog(&$priority, &$msg, &$filename)
- {
- static $firephp_priorities = array(FirePHP::ERROR, FirePHP::ERROR, FirePHP::ERROR, FirePHP::ERROR,
- FirePHP::WARN, FirePHP::LOG, FirePHP::LOG, FirePHP::INFO);
- $fp_priority = $firephp_priorities[$priority];
- $this->firephp->fb($msg, $fp_priority);
- }
- function onPluginVersion(&$versions)
- {
- $versions[] = array('name' => 'FirePHP',
- 'version' => GNUSOCIAL_VERSION,
- 'author' => 'Craig Andrews',
- 'homepage' => 'http://status.net/wiki/Plugin:FirePHP',
- 'rawdescription' =>
-
- _m('The FirePHP plugin writes StatusNet\'s log output to FirePHP.'));
- return true;
- }
- }
|