/[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.2, Thu Jul 23 15:00:57 2009 UTC revision 1.1.2.3, Thu Jul 23 16:14:32 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: errorlog.module,v 1.1.2.1 2008/12/29 20:09:56 kbahey Exp $  // $Id: errorlog.module,v 1.1.2.2 2009/07/23 15:00:57 davereid Exp $
3    
4  // Copyright 2007 Khalid Baheyeldin http://2bits.com  // Copyright 2007 Khalid Baheyeldin http://2bits.com
5    
# Line 19  function errorlog_help($path, $arg) { Line 19  function errorlog_help($path, $arg) {
19    }    }
20  }  }
21    
22    /**
23     * Implementation of hook_menu().
24     */
25  function errorlog_menu() {  function errorlog_menu() {
26    $items['admin/settings/logging/errorlog'] = array(    $items['admin/settings/logging/errorlog'] = array(
27      'title' => t('Web server logging and alerts'),      'title' => 'Web server logging and alerts',
28      'description' => t('Settings for error log logging and alerts.'),      'description' => 'Settings for error log logging and alerts.',
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'),
# Line 50  function errorlog_admin_settings() { Line 53  function errorlog_admin_settings() {
53    return system_settings_form($form);    return system_settings_form($form);
54  }  }
55    
56    /**
57     * Implementation of hook_watchdog().
58     */
59  function errorlog_watchdog($log) {  function errorlog_watchdog($log) {
60    global $user;    global $user;
61    $language = user_preferred_language($user);    $language = user_preferred_language($user);
62    $message = theme('errorlog_format', $log);    $message = theme('errorlog_format', $log);
63    if (variable_get('errorlog_' . $log['severity'], FALSE)) {    if (variable_get('errorlog_' . $log['severity'], FALSE)) {
64      error_log($message);      error_log($message);
65    }    }
66  }  }
67    
68    /**
69     * Implementation of hook_theme().
70     */
71  function errorlog_theme() {  function errorlog_theme() {
72    return array(    return array(
73      'errorlog_format' => array(      'errorlog_format' => array(

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

  ViewVC Help
Powered by ViewVC 1.1.2