You are here

function flog_settings in File logger 7

Same name and namespace in other branches
  1. 6 flog.admin.inc \flog_settings()

Form for configuring file logger settings.

See also

system_settings_form()

1 string reference to 'flog_settings'
flog_menu in ./flog.module
Implementation of hook_menu()

File

./flog.admin.inc, line 13
Admin page callbacks for the flog module.

Code

function flog_settings() {
  $form['flog_enabled'] = array(
    '#type' => 'radios',
    '#title' => t('File logging is'),
    '#default_value' => variable_get('flog_enabled', 0),
    '#options' => array(
      t('Disabled'),
      t('Enabled'),
    ),
    '#description' => t('Enable or disable logging to file.'),
  );
  $form['flog_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Log file directory'),
    '#default_value' => variable_get('flog_path', '/var/log'),
    '#size' => 40,
    '#description' => t('Directory where your log file(s) live (e.g. /var/log). Don\'t include a trailing slash.'),
  );
  $form['flog_file'] = array(
    '#type' => 'textfield',
    '#title' => t('Default log file name'),
    '#default_value' => variable_get('flog_file', 'drupal.log'),
    '#size' => 40,
    '#description' => t('Default log file to receive print_r() dumps. Can be overridden by specifying another file name as the third argument to flog_it().'),
  );
  $form['flog_date'] = array(
    '#type' => 'textfield',
    '#title' => t('Date string'),
    '#default_value' => variable_get('flog_date', 'Y-m-d H:i:s'),
    '#size' => 20,
    '#description' => t('Format of date string (see php !date docs).  Make this blank for no date/time output.', array(
      '!date' => l(t('Date function'), 'http://php.net/manual/en/function.date.php'),
    )),
  );
  return system_settings_form($form);
}