holyfalcon/logviewer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

holyfalcon/logviewer

最新稳定版本:v1.0.1

Composer 安装命令:

composer require holyfalcon/logviewer

包简介

organized logs

README 文档

README

License Latest Stable Version PHP version Build Status

This package gives you a list of project logs. You can regularly check the log content with the time and level of that log in separate records.

Advantages of this package

Unlike other similar packages that read and display the records from the laravel.log file to check the project log, in this package, as soon as the log is created, before a record is saved in the file, it converts it to the appropriate format and the important parts of each record. For example: it extracts the content, level, date and channel of the record and stores it in the database. This makes the log list not dependent on the file, and if the size of the log file increases, the loading speed of the page related to the logs will not decrease.

Install package

Install via composer

composer require holyfalcon/logviewer

Add Service Provider to config/app.php in providers section

Falcon\Logviewer\LogviewerServiceProvider::class,

To get the log in real time we should define new channel in config/logging.php inside channels array below of stack channel

'stack' => [
...
],

'log-viewer' => [
    'driver' => 'custom',
    'via' => \Falcon\Logviewer\Services\LogviewerService::class,
    'level' => 'debug',
],

Add this log-viewer in channels of stack

'stack' => [
            'driver' => 'stack',
            'channels' => ['single', 'log-viewer'],
            'ignore_exceptions' => false,
        ],

Migrate logs table for storing records:

php artisan migrate

Now you can publish the views by the artisan command:

php artisan vendor:publish --tag=views

That's it after this steps in /logs you can see logs of your project.

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-17