kld/error-log-capture

capture errors from log and save index to entry

dev-main 2021-12-26 14:46 UTC

This package is auto-updated.

Last update: 2024-03-26 20:03:43 UTC


README

#Error log capture

"Error log capture" capture errors from logs, is an extension of Yii2 Audit.

Usage

Download

Download using composer by running the following command:

composer require itkld/error-log-capture:"dev-main"

Module Configuration

Add Audit to your configuration array:

<?php
$config = [
    'modules' => [
        'audit' => [
                ...
                'panelsMerge' => [
                    'audit/log' => [
                        'class' => 'kld\error_log_capture\LogPanel'
                        'isCaptureAll' => true,
                        'keywords' => [
                            'error',
                            'exception',
                            '错误',
                            '异常',
                        ],
                        /*
                        'allowLevels' => [
                            LogLevel::WARNING,
                            LogLevel::ERROR,
                        ]
                        */
                    ],
                ]
        ],
    ],
];

Viewing the Audit Data

http://localhost/path/to/index.php?r=audit/error