You are here

function monolog_monolog_handler_info in Monolog 6

Same name and namespace in other branches
  1. 7 monolog.monolog.inc \monolog_monolog_handler_info()

Implements hook_monolog_handler_info().

File

./monolog.monolog.inc, line 18
Monolog hook implementations.

Code

function monolog_monolog_handler_info() {
  $handlers = array();
  $handlers['stream'] = array(
    'label' => t('Stream Handler'),
    'description' => t('Logs records into any PHP stream, use this for log files.'),
    'group' => t('Files and syslog'),
    'default settings' => array(
      'filepath' => 'public://monolog/drupal.log',
    ),
  );
  $handlers['rotating_file'] = array(
    'label' => t('Rotating File Handler'),
    'description' => t('Logs records to a file and creates one logfile per day. It will also delete files older than the "Max Files" settings.'),
    'group' => t('Files and syslog'),
    'default settings' => array(
      'filepath' => 'public://monolog/drupal.log',
      'max_files' => 0,
    ),
  );
  $handlers['syslog'] = array(
    'label' => t('Syslog Handler'),
    'description' => t('Logs records to the syslog.'),
    'group' => t('Files and syslog'),
    'default settings' => array(
      'ident' => 'drupal',
    ),
  );
  $handlers['native_mailer'] = array(
    'label' => t('Native Mail Handler'),
    'description' => t('Sends emails using PHP\'s <code>mail()</code> function.'),
    'group' => t('Alerts and emails'),
    'default settings' => array(
      'to' => '<site-mail>',
      'from' => '<site-mail>',
      'subject' => t('Log message sent by !site', array(
        '!site' => variable_get('site_name', 'Drupal'),
      )),
    ),
  );
  $handlers['socket'] = array(
    'label' => t('Sockets Handler'),
    'description' => t('Logs records to sockets, use this for UNIX and TCP sockets.'),
    'group' => t('Servers and networked logging'),
    'default settings' => array(
      'connection_string' => '',
      'persistent' => 0,
      'connection_timeout' => 5,
      'write_timeout' => 60,
    ),
  );
  $handlers['chromephp'] = array(
    'label' => t('ChromePHP Handler'),
    'description' => t('Handler for ChromePHP, providing inline console messages within Chrome.'),
    'group' => t('Development'),
    'settings callback' => FALSE,
  );
  $handlers['firephp'] = array(
    'label' => t('FirePHP Handler'),
    'description' => t('Handler for FirePHP, providing inline console messages within FireBug.'),
    'group' => t('Development'),
    'settings callback' => FALSE,
  );
  $handlers['null'] = array(
    'label' => t('Null Handler'),
    'description' => t('Any record it can handle will be thrown away. This can be used to put on top of an existing handler stack to disable it temporarily.'),
    'group' => t('Wrappers / special handlers'),
  );
  return $handlers;
}