Skip to content

Commit

Permalink
chore: fixed formatting issues and added more descriptive comment
Browse files Browse the repository at this point in the history
  • Loading branch information
khatruong2009 committed Sep 25, 2023
1 parent 422a196 commit 529fd92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ enum Category {
/// Listen for or dispatch Amplify events
hub,

/// Logging
/// Logging events and errors to the cloud
logging,

/// Upload and download files from the cloud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin
events[tooNewStartIndex!].timestamp.toInt(),
);
// set logs to end before the index.

logs.removeRange(tooNewStartIndex, events.length);
// set events to end before the index.
events.removeRange(tooNewStartIndex, events.length);
Expand All @@ -174,7 +173,6 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin

// after sending each batch to CloudWatch check if the batch has
// `tooNewException` and throw to stop syncing next batches.

if (tooNewException != null) {
throw tooNewException;
}
Expand All @@ -195,8 +193,9 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin
} on Exception catch (e) {
logger.error('Failed to sync logs to CloudWatch.', e);
} finally {
_handleFullLogStoreAfterSync(retryTime: nextRetry);

_handleFullLogStoreAfterSync(
retryTime: nextRetry,
);
_syncing = false;
}
}
Expand Down Expand Up @@ -312,7 +311,6 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin
LoggingCategoryMethod.batchSend,
_startSyncingIfNotInProgress,
);
// await _startSyncingIfNotInProgress();
}
}

Expand Down

0 comments on commit 529fd92

Please sign in to comment.