/[drupal]/contributions/modules/logging_alerts/errorlog/errorlog.module
ViewVC logotype

Diff of /contributions/modules/logging_alerts/errorlog/errorlog.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.1, Mon Dec 29 20:09:56 2008 UTC revision 1.1.2.2, Thu Jul 23 15:00:57 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: errorlog.module,v 1.1 2008/11/18 23:59:24 kbahey Exp $  // $Id: errorlog.module,v 1.1.2.1 2008/12/29 20:09:56 kbahey Exp $
3    
4  // Copyright 2007 Khalid Baheyeldin http://2bits.com  // Copyright 2007 Khalid Baheyeldin http://2bits.com
5    
# Line 37  function errorlog_admin_settings() { Line 37  function errorlog_admin_settings() {
37      '#description' => t('Check each severity level you want to get logged to the error log.'),      '#description' => t('Check each severity level you want to get logged to the error log.'),
38    );    );
39    
40    foreach(errorlog_severity_list() as $severity => $description) {    foreach (watchdog_severity_levels() as $severity => $description) {
41        $description = drupal_ucfirst($description);
42      $key = 'errorlog_' . $severity;      $key = 'errorlog_' . $severity;
43      $form['errorlog'][$key] = array(      $form['errorlog'][$key] = array(
44        '#type'          => 'checkbox',        '#type'          => 'checkbox',
# Line 49  function errorlog_admin_settings() { Line 50  function errorlog_admin_settings() {
50    return system_settings_form($form);    return system_settings_form($form);
51  }  }
52    
 function errorlog_severity_list() {  
   return array(  
     WATCHDOG_EMERG    => t('Emergency'),  
     WATCHDOG_ALERT    => t('Alert'),  
     WATCHDOG_CRITICAL => t('Critical'),  
     WATCHDOG_ERROR    => t('Error'),  
     WATCHDOG_WARNING  => t('Warning'),  
     WATCHDOG_NOTICE   => t('Notice'),  
     WATCHDOG_INFO     => t('Info'),  
     WATCHDOG_DEBUG    => t('Debug'),  
   );  
 }  
   
53  function errorlog_watchdog($log) {  function errorlog_watchdog($log) {
54    global $user;    global $user;
55    $language = user_preferred_language($user);    $language = user_preferred_language($user);

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2