PHPackages                             bvtvd/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. bvtvd/hyperf-log-viewer

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

bvtvd/hyperf-log-viewer
=======================

hyperf log viewer

2.0.0(5y ago)23.7kMITPHPPHP &gt;=7.2

Since Jun 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/bvtvd/hyperf-log-viewer)[ Packagist](https://packagist.org/packages/bvtvd/hyperf-log-viewer)[ RSS](/packages/bvtvd-hyperf-log-viewer/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

发布配置文件

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

```

该命令会发布一个配置文件log\_viewer.php 到 config/autoload 下, 发布一个视图文件 log.blade.php 到 storage/view 下

在 config/routes 文件中自定义查看日志的访问路由, 如:

```
Router::get('/logs', 'bvtvd\HyperfLogViewer\Controller\LogController@index');

```

### 注意

[](#注意)

- 该包需要安装 hyperf/view, 还需要 duncan3dc/blade 模板引擎提供支持, 慎用.
- 视图配置如下

```
use Hyperf\View\Engine\BladeEngine;
use Hyperf\View\Mode;

return [
    'engine' => BladeEngine::class,
    'mode' => Mode::TASK,
    'config' => [
        'view_path' => BASE_PATH . '/storage/view/',
        'cache_path' => BASE_PATH . '/runtime/view/',
    ],
];

```

- 需要将日志文件按日志进行分割
- 可以选择将程序运行异常输出到日志文件, 修改 app\\Exception\\Handler\\AppExceptionHandler.php 文件如下:

```
class AppExceptionHandler extends ExceptionHandler
{
    /**
     * @var StdoutLoggerInterface
     */
    protected $logger;

    public function __construct(StdoutLoggerInterface $logger)
    {
        $this->logger = $logger;
    }

    public function handle(Throwable $throwable, ResponseInterface $response)
    {
        ApplicationContext::getContainer()->get(LoggerFactory::class)->make()->error(sprintf("%s[%s] in %s\n[stacktrace]\n%s", $throwable->getMessage(), $throwable->getLine(), $throwable->getFile(), $throwable->getTraceAsString()));

        return $response->withHeader("Server", "Hyperf")->withStatus(500)->withBody(new SwooleStream('Internal Server Error.'));
    }

    public function isValid(Throwable $throwable): bool
    {
        return true;
    }
}

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~13 days

Total

4

Last Release

2112d ago

Major Versions

1.0.2 → 2.0.02020-07-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/23225b6e0e0176f501075de6474706f023b4ae9b5956a1a0b3f796b0c7087e85?d=identicon)[bvtvd](/maintainers/bvtvd)

---

Top Contributors

[![bvtvd](https://avatars.githubusercontent.com/u/18694985?v=4)](https://github.com/bvtvd "bvtvd (6 commits)")

---

Tags

phphyperf

### Embed Badge

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

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

###  Alternatives

[friendsofhyperf/sentry

The sentry component for Hyperf.

1864.6k](/packages/friendsofhyperf-sentry)[minbaby/hyperf-sentry

1926.7k](/packages/minbaby-hyperf-sentry)

PHPackages © 2026

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