creative-syntax/laravel-logviewer

一个简单的Laravel日志查看器包

安装: 21

依赖项: 0

建议者: 0

安全: 0

星标: 9

关注者: 2

分支: 1

开放问题: 1

类型:laravel-package

v2.0.0 2023-03-04 18:21 UTC

This package is auto-updated.

Last update: 2024-09-13 22:12:08 UTC


README

一个用于查看或渲染Laravel日志的包。它还可以提取不同级别的日志。

安装

不依赖于PHP版本和LARAVEL版本

步骤 1:运行composer命令

composer require creative-syntax/laravel-logviewer

步骤 2:Laravel不带自动发现

如果您不使用自动发现,请将ServiceProvider添加到config/app.php中的providers数组

CreativeSyntax\LogViewer\CreativeSyntaxLogViewer::class,

步骤 3:发布包配置

php artisan vendor:publish --provider="CreativeSyntax\LogViewer\CreativeSyntaxLogViewer" --force

如何使用?非常简单

通过路由直接使用

>> 只需安装并运行以下路由
Ex: http://your-website/onex/log-viewer

Ex: http://:8000/onex/log-viewer

log_viewer

extract_log

功能/特性

>> 下载所有日志文件为zip文件
>> 下载选定的日志文件为zip文件
>> 只需点击即可删除所有日志文件
>> 删除选定的日志文件
>> 您还可以下载、清除、删除每个日志文件
>> 您可以通过配置设置限制对日志文件的访问
>> 您可以根据需要自定义配置

您可以在“config/log-viewer.php”中修改配置设置

/** If you want to disable the route or this feature, then make it false */
'is_route_enabled' => true,
/** If you want to change the route prefix */
'route_prefix' => 'onex',
/** If you want to change the route name or path */
'route_name' => 'log-viewer',
/** If you want to change the page heading */
'page_heading' => 'Logs Viewer',
/** If you want to enable the securiry for access the system logs information
 *  Then make it ('is_enabled') true and also you can set login-id and password through .env
 */
'authentication' => [
    'is_enabled' => env('LOGVIEWER_AUTH_ENABLED', false),
    'login_id' => env('LOGVIEWER_LOGIN_ID', 'onexadmin'),
    'password' => env('LOGVIEWER_LOGIN_PASSWORD', 'onexpassword')
]

admin_access

许可证

MIT许可证(MIT)。请参阅许可证文件以获取更多信息。

提交问题:如果有任何问题

如果有任何问题,请联系我