yiisoft / log-target-syslog
Yii Logging Library - Syslog Target
Fund package maintenance!
Opencollective
yiisoft
Requires
- php: ^8.0
- psr/log: ^3.0
- yiisoft/log: ^2.0
Requires (Dev)
- maglnet/composer-require-checker: ^4.2
- php-mock/php-mock-phpunit: ^2.6
- phpunit/phpunit: ^9.5
- rector/rector: ^0.15.1
- roave/infection-static-analysis-plugin: ^1.25
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^4.30|^5.6
- yiisoft/di: ^1.2
README
Yii Logging Library - Syslog Target
This package provides the Syslog target for the yiisoft/log library.
Requirements
- PHP 8.0 or higher.
Installation
The package could be installed with Composer:
composer require yiisoft/log-target-syslog
General usage
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:
Documentation
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.
License
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.