承接 overplex/yii2-log-reader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

overplex/yii2-log-reader

最新稳定版本:v2.4.3

Composer 安装命令:

composer require overplex/yii2-log-reader

包简介

Yii2 log reader

README 文档

README

Yii2 log reader

this project is extend from zhuravljov/yii2-logreader, and Add more operation like delete download tail and so on.

from 2.0. history can load file that Yii2 FileTarget rotated. See History Usage

Preview

Index

preview1

History

preview2

Table

preview3

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist overplex/yii2-log-reader "2.*"

or add

"overplex/yii2-log-reader": "2.*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply modify your application configuration as follows:

return [
    'bootstrap' => ['log-reader'],
    'modules' => [
        'log-reader' => [
            'class' => 'kriss\logReader\Module',
            //'as login_filter' => UserLoginFilter::class, // to use login filter
            'aliases' => [
                'Frontend' => '@frontend/runtime/logs/app.log',
                'Backend' => '@backend/runtime/logs/app.log',
                'Console' => '@console/runtime/logs/app.log',
            ],
            //'defaultTailLine' => 200,
        ],
    ],
];

You can then access Log Reader using the following URL:

http://localhost/path/to/index.php?r=log-reader

or if you have enabled pretty URLs, you may use the following URL:

http://localhost/path/to/log-reader

History Usage

For every day log view, you can config yii log like this:

[
    'class' => 'yii\log\FileTarget',
    'categories' => ['test'],
    'logVars' => [],
    'logFile' => '@runtime/logs/test/test.log.' . date('Ymd'), // important
    'maxLogFiles' => 31,
    'dirMode' => 0777,
    'fileMode' => 0777,
]

And config log-reader module aliases like:

'test' => '@runtime/logs/test/test.log'

Then log with be save filename like test.log.20190924. This is log-reader history load filename.

So you can view every day log in history action.

统计信息

  • 总下载量: 94
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-21