A Handler for logging to a remote syslogd server.

CloneableInstantiable
ExtendsMonolog\Handler\AbstractSyslogHandler
Monolog\Handler\AbstractProcessingHandler
Monolog\Handler\AbstractHandler
Monolog\Handler\Handler
ImplementsMonolog\Handler\FormattableHandlerInterface
Monolog\Handler\HandlerInterface
Monolog\Handler\ProcessableHandlerInterface
Monolog\ResettableInterface
Constants
public Monolog\Handler\SyslogUdpHandler::RFC3164 = 0
public Monolog\Handler\SyslogUdpHandler::RFC5424 = 1
Methods
public __construct(string $host, int $port = 514, $facility = 8, $level = 100, bool $bubble = true, string $ident = 'php', int $rfc = 1)
 
    public Monolog\Handler\Handler::__destruct()
    public Monolog\Handler\Handler::__sleep()
    public close() : void
    public Monolog\Handler\AbstractHandler::getBubble() : bool
     

    Gets the bubbling behavior.

    • return bool true means that this handler allows bubbling. false means that bubbling is not permitted.
    public Monolog\Handler\AbstractProcessingHandler::getFormatter() : Monolog\Formatter\FormatterInterface
     

    {@inheritdoc}

    public Monolog\Handler\AbstractHandler::getLevel() : int
     

    Gets minimum logging level at which this handler will be triggered.

    • return int
    public Monolog\Handler\AbstractProcessingHandler::handle(array $record) : bool
     

    {@inheritdoc}

    public Monolog\Handler\Handler::handleBatch(array $records) : void
     

    {@inheritdoc}

    public Monolog\Handler\AbstractHandler::isHandling(array $record) : bool
     

    {@inheritdoc}

    public Monolog\Handler\AbstractProcessingHandler::popProcessor() : callable
     

    {@inheritdoc}

    public Monolog\Handler\AbstractProcessingHandler::pushProcessor(callable $callback) : Monolog\Handler\HandlerInterface
     

    {@inheritdoc}

    • suppress PhanTypeMismatchReturn
    public Monolog\Handler\AbstractProcessingHandler::reset()
    public Monolog\Handler\AbstractHandler::setBubble(bool $bubble) : self
     

    Sets the bubbling behavior.

    • return self
    public Monolog\Handler\AbstractProcessingHandler::setFormatter(Monolog\Formatter\FormatterInterface $formatter) : Monolog\Handler\HandlerInterface
     

    {@inheritdoc}

    • suppress PhanTypeMismatchReturn
    public Monolog\Handler\AbstractHandler::setLevel( $level) : self
     

    Sets minimum logging level at which this handler will be triggered.

    • return self
    public setSocket(Monolog\Handler\SyslogUdp\UdpSocket $socket) : self
     

    Inject your own socket, mainly used for testing

    Properties
    protected Monolog\Handler\AbstractHandler::$bubble
    protected Monolog\Handler\AbstractSyslogHandler::$facilities
     

    List of valid log facility names.

    protected Monolog\Handler\AbstractSyslogHandler::$facility
    protected Monolog\Handler\AbstractProcessingHandler::$formatter
     
    • var FormatterInterface
    protected $ident
    protected Monolog\Handler\AbstractHandler::$level
    protected Monolog\Handler\AbstractSyslogHandler::$logLevels
     

    Translates Monolog log levels to syslog log priorities.

    protected Monolog\Handler\AbstractProcessingHandler::$processors
     
    • var callable[]
    protected $rfc
    protected $socket
    Methods
    protected Monolog\Handler\AbstractSyslogHandler::getDefaultFormatter() : Monolog\Formatter\FormatterInterface
     

    {@inheritdoc}

    protected makeCommonSyslogHeader(int $severity, DateTimeInterface $datetime) : string
     

    Make common syslog header (see rfc5424 or rfc3164)

    protected Monolog\Handler\AbstractProcessingHandler::processRecord(array $record) : array
     

    Processes a record.

    protected Monolog\Handler\AbstractProcessingHandler::resetProcessors() : void
    protected write(array $record) : void
    Properties
    private $dateFormats
    Methods
    private splitMessageIntoLines( $message) : array
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only