horat1us / yii2-queue-log
Yii2 Advanced Queue Log Behavior
1.0.3
2023-06-23 19:51 UTC
Requires
- php: >=7.2
- yiisoft/yii2: ^2.0.19
- yiisoft/yii2-queue: ^2.3
Requires (Dev)
- horat1us/yii2-asset-free: ^1.0.1
- phpunit/phpunit: ^8.3
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-10-23 22:38:14 UTC
README
Purpose of this package to create replacement for Yii2 built-in LogBehavior.
Why replacement? Because built-in LogBehavior write logs in string format: it cannot be easy parsed and processed.
This logger push same messages, but use classes:
- Error - queue job errors. Original exception will be stored as \Previous (instead of string, compared to built-in LogBehavior).
- MessageInterface - another events.
Installation
composer require horat1us/yii2-queue-log
Usage
<?php use Horat1us\Yii\Queue; return [ 'components' => [ 'queue' => [ 'class' => \yii\queue\redis\Queue::class, 'as log' => Queue\Log\Behavior::class, ], ], ];