/[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.4, Thu Jul 23 16:15:53 2009 UTC revision 1.1.2.5, Thu Jul 23 16:29:00 2009 UTC
# Line 1  Line 1 
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    
# Line 29  function errorlog_menu() { Line 29  function errorlog_menu() {
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   */   */

Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.1.2.5

  ViewVC Help
Powered by ViewVC 1.1.2