File tree 1 file changed +7
-7
lines changed
packages/core/src/Providers
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -496,19 +496,19 @@ class AWSCloudWatchProvider implements LoggingProvider {
496
496
try {
497
497
if ( this . _getDocUploadPermissibility ( ) ) {
498
498
await this . _safeUploadLogEvents ( ) ;
499
- this . _retryCount = 0 ;
500
499
}
501
500
} catch ( err ) {
502
501
this . _retryCount ++ ;
503
- if ( this . _retryCount < this . _maxRetries ) {
502
+ if ( this . _retryCount > this . _maxRetries ) {
504
503
logger . error (
505
- `error when calling _safeUploadLogEvents in the timer interval - ${ err } `
506
- ) ;
507
- } else if ( this . _retryCount === this . _maxRetries ) {
508
- logger . error (
509
- `CloudWatch log upload failed after ${ this . _maxRetries } attempts. Suppressing further error logs. Upload attempts will continue in the background.`
504
+ `Max retries (${ this . _maxRetries } ) reached. Stopping log uploads.`
510
505
) ;
506
+ clearInterval ( this . _timer ) ;
507
+ return ;
511
508
}
509
+ logger . error (
510
+ `error when calling _safeUploadLogEvents in the timer interval - ${ err } `
511
+ ) ;
512
512
}
513
513
} , 2000 ) ;
514
514
}
You can’t perform that action at this time.
0 commit comments