function _perfmon_log in Performance monitor 8
Same name and namespace in other branches
- 7 perfmon.inc \_perfmon_log()
Log errors and notices.
Parameters
string $check_name: Test or operation name.
string $message: Error message or notice.
array $variables: Replacments variables in message.
string $type: Log type.
3 calls to _perfmon_log()
- perfmon_store_results in ./
perfmon.module - Store test results.
- _perfmon_batch_finished in ./
perfmon.module - Finished callback for Batch processing the checklist.
- _perfmon_run_test in ./
perfmon.module - Run a single Security Review check.
File
- ./
perfmon.module, line 564 - Stand-alone perfmon test system.
Code
function _perfmon_log($check_name, $message, $variables = [], $type = 'error') {
switch ($type) {
case 'notice':
\Drupal::logger('perfmon:' . $check_name)
->notice($message, $variables);
break;
case 'error':
\Drupal::logger('perfmon:' . $check_name)
->error($message, $variables);
break;
}
// Allow other modules to invoke hook when logging.
\Drupal::moduleHandler()
->invokeAll('perfmon_log', [
$check_name,
$message,
$variables,
$type,
]);
}