Adjust log level
Altered the log level settings to decrease the overall size of logs.
Jira-Id: IT-103
Change-Id: I15af47d3f33e90fd439f2c3b43e33b0f155bdc59
Signed-off-by: Patrizio <patrizio.gelosi@amarulasolutions.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/GerritClientComments.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/GerritClientComments.java
index 3b6835c..2ea494a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/GerritClientComments.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/GerritClientComments.java
@@ -61,7 +61,7 @@
long updatedTimeStamp = getTimeStamp(commentObject.get("updated").getAsString());
if (commentAuthorUsername.equals(authorUsername) &&
updatedTimeStamp >= commentsStartTimestamp - MAX_SECS_GAP_BETWEEN_EVENT_AND_COMMENT) {
- log.info("Found comment with updatedTimeStamp : {}", updatedTimeStamp);
+ log.debug("Found comment with updatedTimeStamp : {}", updatedTimeStamp);
latestChangeMessageId = changeMessageId;
}
latestComments.computeIfAbsent(changeMessageId, k -> new ArrayList<>()).add(commentObject);
@@ -117,7 +117,7 @@
for (HashMap<String, Object> reviewBatch : reviewBatches) {
String message = (String) reviewBatch.get("content");
if (message.trim().isEmpty()) {
- log.info("Post comment empty message not submitted.");
+ log.info("Empty message from post comment not submitted.");
continue;
}
if (reviewBatch.containsKey("line") || reviewBatch.containsKey("range")) {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/OpenAiClient.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/OpenAiClient.java
index 7909d3e..cd2b52b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/OpenAiClient.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/client/OpenAiClient.java
@@ -70,9 +70,9 @@
private HttpRequest createRequest(Configuration config, String patchSet) {
URI uri = URI.create(URI.create(config.getGptDomain()) + UriResourceLocator.chatCompletionsUri());
- log.info("ChatGPT request URI: {}", uri);
+ log.debug("ChatGPT request URI: {}", uri);
requestBody = createRequestBody(config, patchSet);
- log.info("ChatGPT request body: {}", requestBody);
+ log.debug("ChatGPT request body: {}", requestBody);
return HttpRequest.newBuilder()
.header(HttpHeaders.AUTHORIZATION, "Bearer " + config.getGptToken())