jeroen-g / cronlog
允许您将定时任务日志记录到您想要的位置。
v1.0
2019-11-26 20:43 UTC
Requires
- illuminate/support: ~5|~6
Requires (Dev)
- orchestra/testbench: ~3|~4
- phpunit/phpunit: ~8
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2024-08-27 21:13:17 UTC
README
允许您将定时任务日志记录到您想要的位置。
安装
通过 Composer
composer require jeroen-g/cronlog
用法
在 app/Console/Kernel.php 中通常是您定义计划任务的地方,这些任务在配置的 schedule:run
定时任务运行时执行。要记录每个计划任务的输出,请将 cronlog()
函数附加到命令调用中。
protected function schedule(Schedule $schedule) { $schedule->command('inspire')->everyMinute()->cronlog(); }
默认情况下,输出使用 Laravel 的 filesystem 的 local
磁盘存储。这可以通过发布并编辑此包的配置或传递磁盘名称作为函数调用参数轻松交换。
php artisan vendor:publish --tag=cronlog.config
protected function schedule(Schedule $schedule) { $schedule->command('inspire')->everyMinute()->cronlog('s3'); }
后者允许您为每个计划任务使用不同的位置!
变更日志
有关最近更改的更多信息,请参阅变更日志。
测试
vendor/bin/phpunit
贡献
有关详细信息,请参阅contributing.md。
安全
如果您发现任何与安全相关的问题,请通过作者邮箱联系,而不是使用问题跟踪器。
致谢
许可
许可。有关更多信息,请参阅许可文件。