This package provides the Syslog target for the yiisoft/log library.
- PHP 8.0 or higher.
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)
- Theopenlog()
identity.$options (int)
- Theopenlog()
options. Defaults toLOG_ODELAY | LOG_PID
.$facility (int)
- Theopenlog()
facility. Defaults toLOG_USER
.
For more information, see the description of the openlog()
function.
Creating a logger:
$logger = new \Yiisoft\Log\Logger([$syslogTarget]);
For use in the Yii framework, see the configuration files:
For a description of using the logger, see the yiisoft/log package.
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
The Yii Logging Library - Syslog Target is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.