Skip to content

Commit

Permalink
Add support for logging to Firebug ( http://www.firephp.org/ ) as log…
Browse files Browse the repository at this point in the history
…ging method.
  • Loading branch information
mantis committed May 17, 2009
1 parent 52102cd commit 4f0fd58
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/logging_api.php
Expand Up @@ -66,6 +66,21 @@ function log_event( $p_level, $p_msg ) {
case 'file':
error_log( $t_php_event . PHP_EOL, 3, $t_modifiers );
break;
case 'firebug':
if( !class_exists( 'FirePHP' ) ) {
if( file_exists( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php' ) ) {
require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php' );
}
}
if( class_exists( 'FirePHP' ) ) {
static $firephp;
if( $firephp === null ) {
$firephp = FirePHP::getInstance(true);
}
$firephp->log( $t_php_event );
return;
}
// if firebug is not available, fall through
default:
# use default PHP error log settings
error_log( $t_php_event . PHP_EOL );
Expand Down

0 comments on commit 4f0fd58

Please sign in to comment.