| 1 |
<?php |
<?php |
| 2 |
// $Id: errorlog.module,v 1.1.2.3 2009/07/23 16:14:32 davereid Exp $ |
// $Id: errorlog.module,v 1.1.2.4 2009/07/23 16:15:53 davereid Exp $ |
| 3 |
|
|
| 4 |
// Copyright 2007 Khalid Baheyeldin http://2bits.com |
// Copyright 2007 Khalid Baheyeldin http://2bits.com |
| 5 |
|
|
| 29 |
'page callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 30 |
'page arguments' => array('errorlog_admin_settings'), |
'page arguments' => array('errorlog_admin_settings'), |
| 31 |
'access arguments' => array('administer site configuration'), |
'access arguments' => array('administer site configuration'), |
| 32 |
|
'file' => 'errorlog.admin.inc', |
| 33 |
); |
); |
| 34 |
return $items; |
return $items; |
| 35 |
} |
} |
| 36 |
|
|
|
function errorlog_admin_settings() { |
|
|
$form['errorlog'] = array( |
|
|
'#type' => 'fieldset', |
|
|
'#title' => t('Error logging for each severity level.'), |
|
|
'#description' => t('Check each severity level you want to get logged to the error log.'), |
|
|
); |
|
|
|
|
|
foreach (watchdog_severity_levels() as $severity => $description) { |
|
|
$description = drupal_ucfirst($description); |
|
|
$key = 'errorlog_' . $severity; |
|
|
$form['errorlog'][$key] = array( |
|
|
'#type' => 'checkbox', |
|
|
'#title' => t('Severity: @description', array('@description' => $description)), |
|
|
'#default_value' => variable_get($key, FALSE), |
|
|
); |
|
|
} |
|
|
|
|
|
return system_settings_form($form); |
|
|
} |
|
|
|
|
| 37 |
/** |
/** |
| 38 |
* Implementation of hook_watchdog(). |
* Implementation of hook_watchdog(). |
| 39 |
*/ |
*/ |