PHP code example of cann / yii2-redis-log
1. Go to this page and download the library: Download cann/yii2-redis-log library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cann / yii2-redis-log example snippets
// ***
'components' => [
'log' => [
'targets' => [
'redis' => [
'class' => 'cann\yii\log\RedisTarget',
'redis' => 'redis',
'key' => 'default',
'levels' => ['trace', 'info'],
'categories' => ['yii\*'],
]
]
],
]