Adjusted log level to DEBUG for specific entries
Modified the log level for certain entries, switching it from INFO to
DEBUG.
Jira-Id: IT-103
Change-Id: I7d8d5d6666272db1a72a00a60e877b9a6097ab49
Signed-off-by: Patrizio <patrizio.gelosi@amarulasolutions.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/config/ConfigCreator.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/config/ConfigCreator.java
index 861e7ac..5bf274e 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/config/ConfigCreator.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/config/ConfigCreator.java
@@ -26,9 +26,9 @@
public Configuration createConfig(Project.NameKey projectName)
throws NoSuchProjectException {
PluginConfig globalConfig = configFactory.getFromGerritConfig(pluginName);
- log.info("These configuration items have been set in the global configuration: {}", globalConfig.getNames());
+ log.debug("These configuration items have been set in the global configuration: {}", globalConfig.getNames());
PluginConfig projectConfig = configFactory.getFromProjectConfig(projectName, pluginName);
- log.info("These configuration items have been set in the project configuration: {}", projectConfig.getNames());
+ log.debug("These configuration items have been set in the project configuration: {}", projectConfig.getNames());
return new Configuration(globalConfig, projectConfig);
}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/listener/EventListenerHandler.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/listener/EventListenerHandler.java
index e9aae67..9e80650 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/listener/EventListenerHandler.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/listener/EventListenerHandler.java
@@ -91,7 +91,7 @@
if (!config.isGlobalEnable() &&
!enabledProjects.contains(projectNameKey.get()) &&
!config.isProjectEnable()) {
- log.info("The project {} is not enabled for review", projectNameKey);
+ log.debug("The project {} is not enabled for review", projectNameKey);
return false;
}
@@ -107,7 +107,7 @@
private boolean isPatchSetReviewEnabled(PatchSetEvent patchSetEvent) {
if (!config.getGptReviewPatchSet()) {
- log.info("Disabled review function for created or updated PatchSets.");
+ log.debug("Disabled review function for created or updated PatchSets.");
return false;
}
Optional<PatchSetAttribute> patchSetAttributeOptional = getPatchSetAttribute(patchSetEvent);
@@ -118,7 +118,7 @@
PatchSetAttribute patchSetAttribute = patchSetAttributeOptional.get();
ChangeKind patchSetEventKind = patchSetAttribute.kind;
if (patchSetEventKind != REWORK) {
- log.info("Change kind '{}' not processed", patchSetEventKind);
+ log.debug("Change kind '{}' not processed", patchSetEventKind);
return false;
}
String authorUsername = patchSetAttribute.author.username;