ranvk / yii2-aliyun-logtarget
Aliyun Logtarget for Yii2
Package info
github.com/ranvk/yii2-aliyun-logtarget
Type:yii2-extension
pkg:composer/ranvk/yii2-aliyun-logtarget
v18.3.15
2018-03-15 03:38 UTC
Requires
- php: >=5.5
- yiisoft/yii2: ~2.0.4
This package is not auto-updated.
Last update: 2026-03-29 13:48:20 UTC
README
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ranvk/yii2-aliyun-logtarget
or add
"ranvk/yii2-aliyun-logtarget": "^18.3"
Usage
To use this extension, simply add the following code in your application configuration:
return [ //.... 'components' => [ 'log' => [ 'targets' => [ [ 'levels' => ['error', 'warning', 'info'], 'class' => 'Ranvk\Yii2AliyunLogtarget\AliyunLogTarget', 'logstore' => 'your_logstore', 'topic' => YII_ENV, 'project' => 'your_project', 'accessKeyId' => 'your_accessKeyId', 'accessKeySecret' => 'your_accessKeySecret', 'endpoint' => 'aliyun_endpoint', ], ], ], ], ];