Skip to content

Instantly share code, notes, and snippets.

@gartes
Last active July 29, 2018 11:02
Show Gist options
  • Select an option

  • Save gartes/3f65074f93ca97c2bdc3ecef5c41f8b1 to your computer and use it in GitHub Desktop.

Select an option

Save gartes/3f65074f93ca97c2bdc3ecef5c41f8b1 to your computer and use it in GitHub Desktop.
FirePHP
ChromePhp::log('Hello console!');
ChromePhp::log($_SERVER);
ChromePhp::warn('something went wrong!');
if( class_exists( 'CL' ) ){
CL::group('Test function mod_virtuemart_product_helper' );
CL::log('var $group', $group );
CL::log('var $nbrReturnProducts' , $nbrReturnProducts);
CL::log('var $withCalc' , $withCalc );
CL::groupEnd();
}
// logging methods
if( class_exists( 'CL' ) ) CL::log('Plain Message');
if( class_exists( 'CL' ) ) CL::info('Info Message');
if( class_exists( 'CL' ) ) CL::warn('Warn Message');
if( class_exists( 'CL' ) ) CL::error('Error Message');
// Group
if( class_exists( 'CL' ) ){
CL::group('Test Group');
CL::log('Hello World');
CL::groupEnd();
}// END IF \CL
// log tables of information
if( class_exists( 'CL' ) ){
$table = array();
$table[] = array('Row 0 Col 0','Row 0 Col 1');
$table[] = array('Row 1 Col 0','Row 1 Col 1');
$table[] = array('Row 2 Col 0','Row 2 Col 1');
CL::table($table);
}// END IF \CL
// Error, Exception & Assertion Handling
try {
throw new Exception('Test Exception');
} catch (Exception $e) {
if( class_exists( 'CL' ) ) CL::error($e);
}
if(JDEBUG){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment