sxywy/laravel-runlogs

针对 laravel 编写的一个composer包,主要是记录一些框架运行日志

v0.0.1 2023-09-19 09:54 UTC

This package is auto-updated.

Last update: 2024-09-20 04:15:29 UTC


README

Software License Travis Total Downloads

Install

composer require sxywy/laravel-runlogs

laravel 使用

php artisan vendor:publish 
// 选择: Sxywy\LaravelRunLogs\SxywylogsServiceProvider

# 配置全局中间件
在 app/Http/Kernel.php 文件的 $middleware 数组中添加如下一行:
\Sxywy\LaravelRunLogs\Middleware\SxywyRequestLogMiddleware::class,

# 配置 command 任务调度
在 app/Console/Kernel.php 文件的 schedule 方法中添加如下一行:
withoutOverlapping: 避免任务重复
everyMinute: 每分钟执行一次
$schedule->command('SxywyRequestLog')->withoutOverlapping()->everyMinute();

Usage

Write a few lines about the usage of this package.

Testing

Run the tests with:

vendor/bin/phpunit

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

Security

If you discover any security-related issues, please email sxy@shuxiaoyuan.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.