This extensions provides support for Loggly as log target for Yii2 applications. It is partially based on the yii 1.* extension yii-loggly by Alexey Ashurok.
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist spacedealer/yii2-loggly "*"
or add
"spacedealer/yii2-loggly": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply modify your application configuration as follows:
'log' => [
'targets' => [
'loggly' => [
'class' => 'spacedealer\loggly\Target',
'customerToken' => 'your_customer_token',
'levels' => ['error', 'warning', 'info', 'trace'],
'tags' => ['console', 'staging']
'enableIp' => false,
'enableTrail' => true,
],
],
],
Comments