Skip to content

ranvk/yii2-aliyun-logtarget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-aliyun-logtarget

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',
                ],
            
            ],
        ],
    ],
];

About

yii2 logtarget use aliyun log (aliyun.com)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages