bankiru/yii-gelf

This package is abandoned and no longer maintained. No replacement package was suggested.

Graylog2 log route for Yii

Installs: 21 733

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 10

Forks: 2

Open Issues: 0

Type:yii-extension

v1.1.1 2021-06-02 14:30 UTC

This package is not auto-updated.

Last update: 2022-11-07 16:05:19 UTC


README

adapter for gelf-php to Yii CLogger

Build Status Scrutinizer Code Coverage Status Coveralls Code Coverage Status Scrutinizer Quality Score SensioLabsInsight Dependency Status HHVM Status License

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