Hosting Skills A.s.b.l. Hosting Skills a.s.b.l.

If you don't see the test messages in Firefox 43 to 56 then check that logging of Server messages is enabled in the web console.
If you don't see the test messages in Firefox 57 or newer then install the Chrome Logger add-on.
If you don't see the test messages in Google Chrome then install the Chrome Logger extension and enable it for your site.

The following code is used to generate the demo:

 CL::group('HSChromeLogger!::LOG'));
CL::log('Plain Message');
CL::info('Info Message');
CL::warn('Warn Message');
CL::error('Error Message');
CL::log('Optional Label:', 'Message');
CL::groupEnd();

You will see 5 messages (log, info, warn, error, log with optional label):

The following code is used to generate the demo:

CL::group('HSChromeLogger!::ERROR');
trigger_error('', E_ERROR);
$E_NOTICE++;
trigger_error('E_USER_ERROR', E_USER_ERROR);
trigger_error('E_USER_WARNING', E_USER_WARNING);
trigger_error('E_USER_NOTICE', E_USER_NOTICE);
if (version_compare(phpversion(), '7.0.0.all', '<')) {
HSChromeLogger::E_STRICT();
}
(string) new HSChromeLogger();
if (version_compare(phpversion(), '7.0.0.all', '<')) {
split(':', '');
} elseif (version_compare(phpversion(), '7.1.0.all', '<')) {
HSChromeLogger::E_STRICT();
} else {
mb_ereg_replace('', '', '', 'e');
}
trigger_error('E_USER_DEPRECATED', E_USER_DEPRECATED);
CL::groupEnd();

where the class HSChromeLogger is defined as:

class HSChromeLogger {
public function E_STRICT() {
}
}

You will see 8 errors (E_WARNING, E_NOTICE, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, E_RECOVERABLE_ERROR, E_DEPRECATED, E_USER_DEPRECATED):


Execution will stop after the exception handler is called. You can test this here. Joomla! 4.x will try to catch exceptions and display an own error page.
Warning: In Joomla! 3.x you will no longer be able to render the page this tag is used in.

The following code is used to generate the demo:

CL::group('HSChromeLogger!::EXCEPTION');
if (4 == JVersion::MAJOR_VERSION) {
CL::exceptionHandler(new Exception('Uncaught Exception'));
}
throw new Exception('Uncaught Exception');
CL::groupEnd();

You will see 1 uncaught exception:

The following code is used to generate the demo:

CL::group('HSChromeLogger!::ASSERTION');
if (version_compare(phpversion(), '7.2.0.all', '<')) {
assert('2 < 1');
} else {
assert(true == false);
}
CL::groupEnd();

You will see 1 assertion (2 < 1) with result FALSE:

­