Skip to content

Commit

Permalink
Merge pull request #30 from softonic/Send-events-in-batches
Browse files Browse the repository at this point in the history
Change log level from error to warning for consistency check error
  • Loading branch information
xaviapa authored Jul 21, 2023
2 parents e422086 + 4e72c9c commit f221222
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Console/Commands/EmitEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected function checkCursorConsistencyWithEvents(int $eventMessagesCount, int

if (!$this->isCursorConsistentWithMessages($previousLastId, $eventMessagesCount, $lastId)) {
$errorMessage = 'Mismatch in the events to send. Retrying...';
Log::error(
Log::warning(
$errorMessage,
compact('previousLastId', 'eventMessagesCount', 'lastId')
);
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Commands/EmitEventsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public function whenSendingABatchButTheCursorAndTheNumberOfEventsIsNotConsistent

$this->eventPublisherMiddleware->shouldNotReceive('store');

Log::shouldReceive('error')
Log::shouldReceive('warning')
->once()
->with(
'Mismatch in the events to send. Retrying...',
Expand Down

0 comments on commit f221222

Please sign in to comment.