sofa / laravel-artisan-log
Logging for Laravel artisan commands and scheduled tasks
Installs: 77 930
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 2
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
Installation
composer require sofa/laravel-artisan-log # Optionally publish configuration to customize behavior: php artisan vendor:publish --provider="Sofa\ArtisanLog\ArtisanLogServiceProvider"
Requires PHP7.4+ and Laravel 7+
This package provides a super simple logging functionality for chosen artisan commands and scheduled jobs.
By default it will start logging in the default channel your app is using:
[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
...
Configuration file contains references and examples how you may want to customize its behavior.