2017 © Pedro Peláez
 

library monolog-syslog3164

Monolog handler for syslog3164

image

dalee/monolog-syslog3164

Monolog handler for syslog3164

  • Saturday, October 7, 2017
  • by dalee
  • Repository
  • 1 Watchers
  • 0 Stars
  • 607 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 46 % Grown

The README.md

Monolog syslog3164 handler

Latest Stable Version Build Status codecov, (*1)

Getting started

$ composer require dalee/monolog-syslog3164

Example

use Monolog\Logger;
use Dalee\Monolog\Handler\Syslog3164Handler;

$logger = new Logger('main');
$handler = new Syslog3164Handler('127.0.0.1', 9010, Syslog3164Handler::FACILITY_UUCP);
$handler->setTag('switchman')->setHostname('app.local');
$logger->pushHandler($handler);
$logger->debug('Error occurred', [
    'system' => 'customer-service',
    'kind' => 'error',
    'payload' => [
        'code' => 5194,
        'message' => 'Error sending report'
    ]
]);

By default Syslog3164Handler is constructed with 127.0.0.1:514, debug level and bubbling. The default facility is user., (*2)

The output for above is:, (*3)

<15>Oct  4 23:10:59 app.local php: Error occurred {"system":"customer-service","kind":"error","payload":{"code":5194,"message":"Error sending report"}}

Notices

According to RFC3164, the total length of the packet must be 1024 or less. In most cases that's not what you want so it's disabled by default but you can use setStrictSize to turn it on., (*4)

The code consists of a single really simple file so there is no separated documentation., (*5)

https://github.com/Seldaek/monolog, (*6)

https://www.ietf.org/rfc/rfc3164.txt, (*7)

The Versions

07/10 2017

dev-master

9999999-dev

Monolog handler for syslog3164

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dalee IA

logging monolog

07/10 2017

v1.0.0

1.0.0.0

Monolog handler for syslog3164

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dalee IA

logging monolog