sofa / laravel-artisan-log
Laravel artisan 命令和计划任务的日志记录
1.0.5
2023-01-31 11:06 UTC
Requires
- php: >=7.4
- illuminate/console: >=7.0
- illuminate/support: >=7.0
- psr/log: ^1.0|^2.0|^3.0
Requires (Dev)
- mockery/mockery: ^1.3
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^9.1
README
安装
composer require sofa/laravel-artisan-log # Optionally publish configuration to customize behavior: php artisan vendor:publish --provider="Sofa\ArtisanLog\ArtisanLogServiceProvider"
要求 PHP7.4+ 和 Laravel 7+
此包为所选 artisan 命令和计划工作提供简单的日志记录功能。
默认情况下,它将在您的应用使用的默认通道中开始记录日志。
[2020-05-16 22:00:01] production.INFO: [artisan scheduled starting] reminders:some-reminder
[2020-05-16 22:00:01] production.INFO: [artisan scheduled finished] reminders:some-reminder
[2020-05-16 22:00:01] production.INFO: [artisan starting] reminders:another-reminder
[2020-05-16 22:00:02] production.INFO: [artisan finished] reminders:another-reminder
[2020-05-16 23:00:02] production.INFO: [artisan starting] reminders:another-reminder
[2020-05-16 23:00:02] production.INFO: [artisan failed with exit code: 12] reminders:another-reminder
...
配置文件 包含了如何自定义其行为的参考和示例。