PHPackages                             wolf-leo/phplogviewer - 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. wolf-leo/phplogviewer

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

wolf-leo/phplogviewer
=====================

php框架日志查看器

v0.11.5(5mo ago)65.9k↑23.8%[3 issues](https://github.com/wolf-leo/phplogviewer/issues)Apache-2.0HTMLPHP &gt;=7.4

Since Oct 8Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/wolf-leo/phplogviewer)[ Packagist](https://packagist.org/packages/wolf-leo/phplogviewer)[ RSS](/packages/wolf-leo-phplogviewer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (18)Used By (0)

PHP日志查看器
========

[](#php日志查看器)

> 目前只支持Laravel、ThinkPHP5+、ThinkPHP6+、ThinkPHP8+、webman 要求 `php >= 7.4`

使用方法
----

[](#使用方法)

```
composer require wolf-leo/phplogviewer
```

预览图
---

[](#预览图)

[![](test/images/demo.png)](test/images/demo.png)

### ThinkPHP 框架中

[](#thinkphp-框架中)

```
    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\thinkphp\LogViewer())->fetch();
    }

    // Version in ThinkPHP 5.X
    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\thinkphp\LogViewerOld())->fetch();
    }
```

### Laravel 框架中

[](#laravel-框架中)

```
    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\laravel\LogViewer())->fetch();
    }
```

### webman 框架中

[](#webman-框架中)

```
    // 如果项目中采用 laravel 组件
    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\webman\laravel\LogViewer())->fetch();
    }
```

```
    // 如果项目中采用 thinkphp 组件
    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\webman\thinkphp\LogViewer())->fetch();
    }
```

> 可自定义配置
>
> 在 `config` 下新建 `logviewer.php` 文件

```
