Fix logOnErrorReadTimeoutWarning formatting

The formatting of the `logOnErrorReadTimeoutWarning` was inconsistent in where it had spaces and where it didn't. This caused words to be smashed together in the log message.

Example output:
```
onError().  Cancelling subscription, and marking self as failed. KCL will recreate the subscription as neccessary to continue processing. If you are seeing this warning frequently consider increasing the SDK timeouts by providing an OverrideConfiguration to the kinesis client. Alternatively youcan configure LifecycleConfig.readTimeoutsToIgnoreBeforeWarning to suppressintermittent ReadTimeout warnings. Last successful request details -- request id - UNKNOWN, timestamp - 2021-12-14T17:41:00.169Z
```
specifically note the `youcan` and `suppressintermittent`.

This change corrects the formatting of this log output to not include these smashed together words.

It also corrects a type in the word `necessary` (was `neccessary`).
This commit is contained in:
Christopher Nash 2021-12-14 11:13:23 -07:00 committed by GitHub
parent bedae95db9
commit 5103c52f66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -199,11 +199,11 @@ class ShardConsumerSubscriber implements Subscriber<RecordsRetrieved> {
} }
protected void logOnErrorReadTimeoutWarning(Throwable t) { protected void logOnErrorReadTimeoutWarning(Throwable t) {
log.warn("{}: onError(). Cancelling subscription, and marking self as failed. KCL will" log.warn("{}: onError(). Cancelling subscription, and marking self as failed. KCL will "
+ " recreate the subscription as neccessary to continue processing. If you " + "recreate the subscription as necessary to continue processing. If you "
+ "are seeing this warning frequently consider increasing the SDK timeouts " + "are seeing this warning frequently consider increasing the SDK timeouts "
+ "by providing an OverrideConfiguration to the kinesis client. Alternatively you" + "by providing an OverrideConfiguration to the kinesis client. Alternatively you "
+ "can configure LifecycleConfig.readTimeoutsToIgnoreBeforeWarning to suppress" + "can configure LifecycleConfig.readTimeoutsToIgnoreBeforeWarning to suppress "
+ "intermittent ReadTimeout warnings. Last successful request details -- {}", + "intermittent ReadTimeout warnings. Last successful request details -- {}",
shardInfoId, recordsPublisher.getLastSuccessfulRequestDetails(), t); shardInfoId, recordsPublisher.getLastSuccessfulRequestDetails(), t);
} }