bankiru / yii-gelf
Graylog2 log route for Yii
Installs: 21 736
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 10
Forks: 2
Open Issues: 0
Type:yii-extension
Requires
- php: >=5.4
- ext-json: *
- graylog2/gelf-php: ~1.2
- yiisoft/yii: ~1.1
Requires (Dev)
- fabpot/php-cs-fixer: ~1.8
- phpunit/phpunit: ~4.6
- satooshi/php-coveralls: ~0.6
This package is not auto-updated.
Last update: 2022-11-07 16:05:19 UTC
README
adapter for gelf-php to Yii CLogger
Installing
Composer
"require": {
"bankiru/yii-gelf": "~1.0"
}
Github
Releases of Graylog2 log route for Yii client are available on Github.
Documentation
To enable logging to Graylog2 you should add log route to Yii config. For example:
return [
// ...
'components' => [
// ...
'log' => [
// ...
'routes' => [
// ...
'graylog2' => [
'class' => 'Bankiru\\Yii\\Logging\\Graylog2\\GelfLogRoute',
'levels' => 'info,warning,error',
'host' => '127.0.0.1',
'port' => 12201,
// 'chunkSize' => Gelf\Transport\UdpTransport::CHUNK_SIZE_LAN,
'extra' => [
'some_extra_field' => 'which will be added to "additionals"'
],
],
// ...
],
// ...
],
// ...
],
// ...
];
Dev
docker build -t bankiru/yii-gelf:latest -f ./Dockerfile ./ docker run -it --rm --net=host -v $SSH_AUTH_SOCK:/ssh-agent-sock --env SSH_AUTH_SOCK=/ssh-agent-sock -v $(pwd):/app -w /app bankiru/yii-gelf:latest bash composer install -o