horat1us/yii2-queue-log

Yii2 Advanced Queue Log Behavior

1.0.3 2023-06-23 19:51 UTC

This package is auto-updated.

Last update: 2024-12-23 22:59:19 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,
        ],
    ],
];

Author

License

MIT