From 74fc09a0be141730c4df51787b1e1d3713647bc1 Mon Sep 17 00:00:00 2001 From: Lucien Luc Date: Thu, 25 Jul 2024 13:45:01 -0700 Subject: [PATCH 1/3] bugfix: debug or trace logging level now properly logs all worker loops --- .../services/kinesis/clientlibrary/lib/worker/Worker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java index c051327e1..0f6025f7d 100644 --- a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java +++ b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java @@ -1205,8 +1205,8 @@ private boolean isInfoEnabled() { private void resetInfoLogging() { if (infoReporting) { - // We just logged at INFO level for a pass through worker loop - if (LOG.isInfoEnabled()) { + // We just logged at minimum INFO level for a pass through worker loop + if (!LOG.isDebugEnabled() || !LOG.isTraceEnabled()) { infoReporting = false; nextReportTime = System.currentTimeMillis() + reportIntervalMillis; } // else is DEBUG or TRACE so leave reporting true From 271ea766357f0e70c62f279c125f02273635a5dc Mon Sep 17 00:00:00 2001 From: lucienlu-aws <132623944+lucienlu-aws@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:04:20 -0700 Subject: [PATCH 2/3] Update comment --- .../services/kinesis/clientlibrary/lib/worker/Worker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java index 0f6025f7d..327e9730b 100644 --- a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java +++ b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java @@ -1205,7 +1205,7 @@ private boolean isInfoEnabled() { private void resetInfoLogging() { if (infoReporting) { - // We just logged at minimum INFO level for a pass through worker loop + // We just logged at INFO level for a pass through worker loop if (!LOG.isDebugEnabled() || !LOG.isTraceEnabled()) { infoReporting = false; nextReportTime = System.currentTimeMillis() + reportIntervalMillis; From d8c357194778c5d3f7b43f43f671a5306582716c Mon Sep 17 00:00:00 2001 From: lucienlu-aws <132623944+lucienlu-aws@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:20:21 -0700 Subject: [PATCH 3/3] fix to be && --- .../services/kinesis/clientlibrary/lib/worker/Worker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java index 327e9730b..150841c96 100644 --- a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java +++ b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java @@ -1206,7 +1206,7 @@ private boolean isInfoEnabled() { private void resetInfoLogging() { if (infoReporting) { // We just logged at INFO level for a pass through worker loop - if (!LOG.isDebugEnabled() || !LOG.isTraceEnabled()) { + if (!LOG.isDebugEnabled() && !LOG.isTraceEnabled()) { infoReporting = false; nextReportTime = System.currentTimeMillis() + reportIntervalMillis; } // else is DEBUG or TRACE so leave reporting true