Squelch warnings from updates
Updates don't need to be nearly as noisy as they were at first; let's
not flood the error log with updated messages.
Change-Id: I6de2264a18ee7c513f58b7eac20c94355f7c52ca
diff --git a/src/main/java/com/googlesource/gerrit/plugins/repositoryuse/Ref.java b/src/main/java/com/googlesource/gerrit/plugins/repositoryuse/Ref.java
index 58c74d2..c7e4bb2 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/repositoryuse/Ref.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/repositoryuse/Ref.java
@@ -72,12 +72,12 @@
public void save() {
lastUpdated = new Date();
+ log.debug(String.format("Saving Ref: %s, %s, %s", project, ref, commit));
table.insertOrUpdate(this);
- log.info(String.format("Saving Ref: %s, %s, %s", project, ref, commit));
}
public void delete() {
- log.info(String.format("Deleting Ref: %s, %s", project, ref));
+ log.debug(String.format("Deleting Ref: %s, %s", project, ref));
table.delete(this);
}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/repositoryuse/Usage.java b/src/main/java/com/googlesource/gerrit/plugins/repositoryuse/Usage.java
index 5ca49a4..48bb2df 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/repositoryuse/Usage.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/repositoryuse/Usage.java
@@ -96,15 +96,15 @@
public void save() {
lastUpdated = new Date();
- table.insertOrUpdate(this);
- log.info(String.format("Saving Usage: %s, %s, %s, %s", project, branch,
+ log.debug(String.format("Saving Usage: %s, %s, %s, %s", project, branch,
destination, ref));
+ table.insertOrUpdate(this);
}
public void delete() {
- table.delete(this);
- log.info(String.format("Deleting Usage: %s, %s, %s", project, branch,
+ log.debug(String.format("Deleting Usage: %s, %s, %s", project, branch,
destination));
+ table.delete(this);
}
public static List<Usage> fetchByProject(String project) {
@@ -120,8 +120,8 @@
}
public static void deleteByBranch(String project, String branch) {
+ log.debug(String.format("Deleting all uses: %s, %s", project, branch));
table.deleteByBranch(project, branch);
- log.info(String.format("Deleting all uses: %s, %s", project, branch));
}
static class Table {