You are here

syslog.inc in Monolog 7

Same filename and directory in other branches
  1. 6 handlers/syslog.inc

Handler include for SyslogHandler.

File

handlers/syslog.inc
View source
<?php

/**
 * @file
 * Handler include for SyslogHandler.
 */
use Monolog\Handler\SyslogHandler;

/**
 * Monolog loader callback; Loads a SyslogHandler handler.
 *
 * @return HandlerInterface
 */
function monolog_syslog_handler_loader($options) {
  return new SyslogHandler($options['ident'], LOG_USER, $options['level'], $options['bubble']);
}

/**
 * Monolog settings form; Settings for the SyslogHandler handler.
 */
function monolog_syslog_handler_settings(&$form, &$form_state, $profile, array $handler) {
  $form['ident'] = array(
    '#title' => t('Identity string'),
    '#type' => 'textfield',
    '#default_value' => $handler['ident'],
    '#description' => t('The string ident is added to each message.'),
  );
}

Functions

Namesort descending Description
monolog_syslog_handler_loader Monolog loader callback; Loads a SyslogHandler handler.
monolog_syslog_handler_settings Monolog settings form; Settings for the SyslogHandler handler.