Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Mar 6, 2024
1 parent bcb96e6 commit 575a7b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Console/Commands/SendNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function handle()
}
}
} else {
Log::debug('SendNotifications - no check');
Log::debug('SendNotifications - no notifications today');
}

Log::debug('SendNotifications - DONE.');
Expand All @@ -126,8 +126,9 @@ private function needCheck()
{
$check_frequency = config('deming.notification.frequency');

return // Daily
($check_frequency === '1') ||
Log::debug('SendNotifications - frequency=' . $check_frequency . ' day=' . Carbon::today()->day . ' dayOfWeek=' . Carbon::today()->dayOfWeek);

return ($check_frequency === '1') ||
// Weekly
(($check_frequency === '7') && (Carbon::today()->dayOfWeek === 1)) ||
// Every two weeks
Expand Down

0 comments on commit 575a7b9

Please sign in to comment.