You are here

emaillog.admin.inc in Logging and alerts 6

Administrative page callbacks for the emaillog module.

File

emaillog/emaillog.admin.inc
View source
<?php

/**
 * @file
 * Administrative page callbacks for the emaillog module.
 */

/**
 * Administration settings form.
 *
 * @see system_settings_form()
 */
function emaillog_admin_settings() {
  $form['emaillog'] = array(
    '#type' => 'fieldset',
    '#title' => t('Email addresses for each severity level.'),
    '#description' => t('Enter an email address for each severity level. For example, you may want to get emergency and critical levels to your pager or mobile phone, while notice level messages can go to a regular email. If you leave the email address blank for a severity level, no email messages will be sent for that severity level.'),
  );
  foreach (watchdog_severity_levels() as $severity => $description) {
    $description = drupal_ucfirst($description);
    $key = 'emaillog_' . $severity;
    $form['emaillog'][$key] = array(
      '#type' => 'textfield',
      '#title' => t('Email address for severity @description', array(
        '@description' => drupal_ucfirst($description),
      )),
      '#default_value' => variable_get($key, ''),
      '#description' => t('The email address to send log entries of severity @description to.', array(
        '@description' => $description,
      )),
    );
  }
  return system_settings_form($form);
}

Functions

Namesort descending Description
emaillog_admin_settings Administration settings form.