You are here

function emaillog_admin_settings in Logging and alerts 7

Same name and namespace in other branches
  1. 6.2 emaillog/emaillog.admin.inc \emaillog_admin_settings()
  2. 6 emaillog/emaillog.admin.inc \emaillog_admin_settings()
  3. 7.2 emaillog/emaillog.admin.inc \emaillog_admin_settings()

Returns admin settings form.

1 string reference to 'emaillog_admin_settings'
emaillog_menu in emaillog/emaillog.module
Implements hook_menu().

File

emaillog/emaillog.admin.inc, line 11
Admin callbacks for the Email Logging and Alerts module.

Code

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) {
    $key = 'emaillog_' . $severity;
    $form['emaillog'][$key] = array(
      '#type' => 'textfield',
      '#title' => t('Email address for severity @description', array(
        '@description' => drupal_ucfirst($description),
      )),
      '#description' => t('The email address to send log entries of severity @description to.', array(
        '@description' => $description,
      )),
      '#default_value' => variable_get($key, ''),
    );
  }
  return system_settings_form($form);
}