Yii Logging Library - Syslog Target
This package provides the Syslog target for the yiisoft/log library.
The package could be installed with composer:
composer require yiisoft/log-target-syslog
Creating a target:
use Yiisoft\Log\Target\Syslog\SyslogTarget; $syslogTarget = new SyslogTarget($identity, $options, $facility);
$identity (string)- The
$options (int)- The
openlog()options. Defaults to
LOG_ODELAY | LOG_PID.
$facility (int)- The
openlog()facility. Defaults to
For more information, see the description of the
Creating a logger:
$logger = new \Yiisoft\Log\Logger([$syslogTarget]);
For a description of using the logger, see the yiisoft/log package.
For use in the Yii framework, see the configuration files:
See Yii guide to logging for more info.
The package is tested with PHPUnit. To run tests:
The package tests are checked with Infection mutation framework. To run it:
The code is statically analyzed with Psalm. To run static analysis:
The Yii Logging Library - Syslog Target is free software. It is released under the terms of the BSD License.
LICENSE for more information.
Maintained by Yii Software.