Add logging
This commit is contained in:
parent
8c08cbf912
commit
bb3f9b343c
2 changed files with 23 additions and 5 deletions
|
@ -4,6 +4,7 @@ namespace App\Console;
|
|||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
|
@ -15,9 +16,23 @@ class Kernel extends ConsoleKernel
|
|||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
$schedule->command('digest:send --daily')->daily();
|
||||
$schedule->command('digest:send --weekly')->weekly();
|
||||
$schedule->command('digest:send --monthly')->monthly();
|
||||
$schedule->command('digest:send --daily')
|
||||
->daily()
|
||||
->onFailure(function() {
|
||||
Log::error("Daily email digest send failed");
|
||||
});
|
||||
|
||||
$schedule->command('digest:send --weekly')
|
||||
->weekly()
|
||||
->onFailure(function() {
|
||||
Log::error("Weekly email digest send failed");
|
||||
});
|
||||
|
||||
$schedule->command('digest:send --monthly')
|
||||
->monthly()
|
||||
->onFailure(function() {
|
||||
Log::error("Monthly email digest send failed");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue