1. Go to this page and download the library: Download kriss/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/ */
kriss / yii2-redis-log example snippets
'log' => [
'targets' => [
[
'class' => 'kriss\log\RedisTarget',
'redis' => [
'hostname' => 'localhost',
'port' => 6379,
],
// If you have configured the redis yii\redis\Connection as an application component,use bwlow
//'redis' => 'redis',
'key' => 'yii.log',
'levels' => ['error', 'warning'],
],
]
]