Skip to content

Commit

Permalink
Improve debug logging to help understand connector issues better.
Browse files Browse the repository at this point in the history
Signed-off-by: Aindriu Lavelle <aindriu.lavelle@aiven.io>
  • Loading branch information
aindriu-aiven committed Feb 5, 2025
1 parent ded8bfd commit 4a56e5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public <K extends Comparable<K>> Optional<Context<K>> process(final K sourceName
getOffset(matcher.get(), sourceName.toString()).ifPresent(ctx::setOffset);
return Optional.of(ctx);
}
LOGGER.debug("{} did not match pattern and was skipped for processing.", sourceName);
return Optional.empty();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public void setContext(final Context<String> context) {
*/
public SourceRecord getSourceRecord(final ErrorsTolerance tolerance) {
try {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Source Record: {} for Topic: {} , Partition: {}, recordCount: {}", getObjectKey(),
getTopic(), getPartition(), getRecordCount());
}
return new SourceRecord(offsetManagerEntry.getManagerKey().getPartitionMap(),
offsetManagerEntry.getProperties(), getTopic(), getPartition(), keyData.schema(), keyData.value(),
valueData.schema(), valueData.value());
Expand Down

0 comments on commit 4a56e5d

Please sign in to comment.