jacky/yii2-redis-log

stores log messages in redis.

1.0.1 2016-01-25 04:00 UTC

This package is not auto-updated.

Last update: 2024-12-25 19:32:59 UTC


README

Requirements

At least redis version 2.6.12 is required for all components to work properly.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist jacky/yii2-redis-log

or add

"jackychan/yii2-redis-log": "~2.0.0"

to the require section of your composer.json.

Configuration

To use this extension, you have to configure the Connection class in your application configuration:

return [
    //....
    'components' => [
        'log' => [
            'targets' => [
				'redis' => [
					'class' => 'jc\yii\redis\RedisTarget',
					'redis' => 'redis',
					'levels' => ['trace', 'info'],
					'categories' => ['yii\*'],
				]
			]
        ],
    ]
];