PHPackages                             sett/hyperf-log-viewer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. sett/hyperf-log-viewer

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

sett/hyperf-log-viewer
======================

v1.1.3(4y ago)65961[1 issues](https://github.com/kxg3030/hyperf-log-viewer/issues)MITPHPPHP &gt;=7.2

Since Sep 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kxg3030/hyperf-log-viewer)[ Packagist](https://packagist.org/packages/sett/hyperf-log-viewer)[ RSS](/packages/sett-hyperf-log-viewer/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (6)Versions (4)Used By (0)

> 最近在Hyperf中需要用到使用路由在线查看文件日志的功能,没有发现比较好用的,自己简单写了一个,支持查看和简单的内容搜索。

#### 一、界面

[](#一界面)

先上效果图： [![](https://camo.githubusercontent.com/0c9a7965dea17e106785441a6461ef2b285460445eb96181c0b08d79c7bc86cc/68747470733a2f2f63646e2e6c6561726e6b752e636f6d2f75706c6f6164732f696d616765732f3230323031312f30332f35393937362f4c4133497a48643457512e706e67216c61726765)](https://camo.githubusercontent.com/0c9a7965dea17e106785441a6461ef2b285460445eb96181c0b08d79c7bc86cc/68747470733a2f2f63646e2e6c6561726e6b752e636f6d2f75706c6f6164732f696d616765732f3230323031312f30332f35393937362f4c4133497a48643457512e706e67216c61726765)

#### 二、使用

[](#二使用)

- 1.安装组件

`composer require sett/hyperf-log-viewer`

- 2.发布配置文件

`php bin/hyperf.php vendor:publish sett/hyperf-log-viewer`

- 3.注册路由

```
Router::get('/logs/list', [LogViewController::class, "index"]);
Router::post('/logs/delete', [LogViewController::class, "delete"]);
Router::get('/logs/download', [LogViewController::class, "download"]);

```

- 4.安装view组件

`composer require hyperf/view`

- 5.安装模板引擎

`composer require sy-records/think-template`

- 6.配置视图

> 在config\\autoload\\viewe.php文件中(如果不存在,自行创建),添加如下视图配置

```
return [
        'engine' => ThinkEngine::class,
        'mode'   => Mode::TASK,
        'config' => [
            // 若下列文件夹不存在请自行创建
            'view_path'  => BASE_PATH . '/storage/view/',
            'cache_path' => BASE_PATH . '/runtime/view/',
        ],
];

```

- 7.配置组件参数

> 在config\\autoload\\logViewer.php文件中,添加自己的日志文件目录

```
return [
   // 自定义, 比如runtime/logs/202011/ 需要定义成:"/runtime/logs/".date("Ym")."/"
   "path" => BASE_PATH . "/runtime/logs/",
   // 日志文件匹配规则
   "pattern" => "*.log",
   // 每页展示的条数
   "size" => 10
   ];

```

#### 三、访问

[](#三访问)

打开自己的访问地址`ip:port/logs/list`就能看到日志界面了

#### 四、说明

[](#四说明)

- 日志时间格式只支持年月日时分秒格式,否则可能看不到记录,日志格式大概是这样

    `[2020-11-02 10:12:48] system.INFO: HTTP Server listening at 0.0.0.0:18310`

    `[2020-11-02 14:52:50] system.ERROR: must implement interface`
- 如果大家有什么意见或者建议，欢迎留言。

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~226 days

Total

3

Last Release

1617d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e616afd31323d0e5e1270d55de007a565d67b4e7e87d6af25580fa06b7a81bc?d=identicon)[kxg3030](/maintainers/kxg3030)

---

Top Contributors

[![kxg2020](https://avatars.githubusercontent.com/u/22949288?v=4)](https://github.com/kxg2020 "kxg2020 (25 commits)")[![kxg3030](https://avatars.githubusercontent.com/u/48542529?v=4)](https://github.com/kxg3030 "kxg3030 (2 commits)")

---

Tags

phpSett

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sett-hyperf-log-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/sett-hyperf-log-viewer/health.svg)](https://phpackages.com/packages/sett-hyperf-log-viewer)
```

###  Alternatives

[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[bavix/laravel-xhprof

Quick profiling of your code for Laravel

22156.6k](/packages/bavix-laravel-xhprof)[h4cc/phpqatools

A meta composer package for PHP QA Tools.

6418.6k1](/packages/h4cc-phpqatools)[thehocinesaad/laravel-error-ai

This package adds Ask AI button to the error page.

2214.4k](/packages/thehocinesaad-laravel-error-ai)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
