nfedoseev/yii2-external-target External logs target for the Yii framework

loggerlogerrorslogtarget

External Target for Logging in Yii2

This extension provides the logging target for the Yii framework 2.0.

Latest Stable Version Total Downloads Yii2 License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist nfedoseev/yii2-external-target

or add

"nfedoseev/yii2-external-target": "*"

to the require section of your composer.json.

Configuring application

After extension is installed you need to setup log target class:

    'components' => [
        'errorHandler' => [
            'errorAction' => 'site/error',
            'class' => 'nfedoseev\yii2\ExternalTarget\ErrorHandler',
        ],
        'logClient' => [
            'class' => 'nfedoseev\yii2\ExternalTarget\LogClient',
            'baseUrl' => 'your_logger_collector_url',
            'site' => 'your_site_identity',
            'user_id' => 'id',
            'ignore_statuses' => [200]
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'nfedoseev\yii2\ExternalTarget\LogTarget',
                    'levels' => ['error'],
                    'categories' => ['yii\db\*', 'app\*'],
                ],
                ...
            ],
        ],
        ...
    ],
...

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



1.5.0 is the latest of 19 releases



MIT license
Stats
0 github stars & 0 github forks
0 downloads in the last day
0 downloads in the last 30 days
558 total downloads