arashdalir / php-analog-udp-syslog
There is no license information available for the latest version (dev-master) of this package.
Extension of arashdalir/php-psr3log handler for udp-based syslog client for analog.
dev-master
2018-06-13 10:02 UTC
Requires
- php: ^5.6
- analog/analog: ^1.0
- arashdalir/php-psr3log: ^1.1
- psr/log: ^1.0
Provides
- psr/log-implementation: 1.0.0
This package is auto-updated.
Last update: 2024-10-21 23:48:17 UTC
README
ArashDalir/UdpSysLog
works as a bridge between analog/analog and arashdalir/psr3-log/handler/syslog which allows sending syslog events over UDP to a syslog server. It also can write syslog events into a local syslog.
Install
Use following command to add the repository to your project:
composer require arashdalir/php-analog-udp-syslog
Or add following line to your composer.json:
{ "require": { "arashdalir/php-analog-udp-syslog": "dev-master" } }
Usage
<?php include 'vendor/autoload.php'; use ArashDalir\UdpSysLog\Handler\UdpSyslog; $logger = new Analog\Logger(); Analog::$timezone = "Europe/Vienna"; $logger->handler(UdpSysLog::init('127.0.0.1', 514, LOG_USER, \ArashDalir\Handler\SysLog\SysLogMessage::VERSION_1, "ada.gemik", "AnalogSysLog", "auto", null, 0)); $logger->alert("testing alert-level udp-syslog for analog"); $logger->alert("testing alert-level udp-syslog for analog"); $logger->alert("testing alert-level udp-syslog for analog"); $logger->info("testing info-level udp-syslog for analog");