Enhance logging functionality
Added the suggestion filename to the logs for scenarios where the
filename is not found in the diffs.
Jira-Id: IT-103
Change-Id: I109b699c02ae7ed56614f718d68a04d4a6939110
Signed-off-by: Patrizio <patrizio.gelosi@amarulasolutions.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
index 1a5df35..a92ccf7 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
@@ -105,7 +105,7 @@
return gerritCommentRange;
}
if (!fileDiffsProcessed.containsKey(filename)) {
- log.info("Suggestion filename '{}' not found in the patch", suggestion);
+ log.info("Filename '{}' not found in suggestion '{}'", filename, suggestion);
return gerritCommentRange;
}
InlineCode inlineCode = new InlineCode(fileDiffsProcessed.get(filename));