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

If you don't see the test messages in Firefox then please check that logging of Server messages is enabled in the web console.
If you don't see the test messages in Google Chrome and you have the Chrome Logger extension installed then please check that you have enabled the extension 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', '<')) {
HSChromeLogger::E_STRICT();
}
(string) new HSChromeLogger();
if (version_compare(phpversion(), '7.0.0', '<')) {
split(':', '');
} else {
HSChromeLogger::E_STRICT();
}
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.
Warning: 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');
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');
assert('2 < 1');
CL::groupEnd();

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

­