function _prod_check_error_reporting in Production check & Production monitor 6
Same name and namespace in other branches
- 7 prod_check.module \_prod_check_error_reporting()
File
- ./
prod_check.module, line 650
Code
function _prod_check_error_reporting($caller = 'internal') {
$check = array();
$title = 'Error reporting';
$setting1 = t('Write errors to the log and to the screen');
$setting2 = t('Write errors to the log');
$path = 'admin/settings/error-reporting';
if ($caller != 'internal') {
$path = PRODCHECK_BASEURL . $path;
}
$check['prod_check_error_reporting'] = array(
'#title' => t($title),
'#state' => variable_get('error_level', 1) != 1,
'#severity' => $caller == 'nagios' ? NAGIOS_STATUS_CRITICAL : PROD_CHECK_REQUIREMENT_ERROR,
'#value_ok' => $setting2,
'#value_nok' => $setting1,
'#description_ok' => prod_check_ok_title($title, $path),
'#description_nok' => t('Your !link settings are set to %setting1, they should be set to %setting2 on a producion environment!', array(
'!link' => '<em>' . l(t($title), $path, array(
'attributes' => array(
'title' => t($title),
),
'query' => drupal_get_destination(),
)) . '</em>',
'%setting1' => $setting1,
'%setting2' => $setting2,
)),
'#nagios_key' => 'ERR',
'#nagios_type' => 'state',
);
return prod_check_execute_check($check, $caller);
}