Do not log exception stack trace when project not in database If a project is present in the events-log database but it has been deleted from Gerrit, a warning is logged stating this project will be also deleted from the events-log database. Given the exception is handled properly, i.e., a sensible action is taken, there is no need to pollute the logs with a stack trace that does not provides any additional useful information. Change-Id: I5d30975440442b51bf99ea874f60d44f681d13ac
diff --git a/src/main/java/com/ericsson/gerrit/plugins/eventslog/sql/SQLStore.java b/src/main/java/com/ericsson/gerrit/plugins/eventslog/sql/SQLStore.java index 0d6e11d..5f24627 100644 --- a/src/main/java/com/ericsson/gerrit/plugins/eventslog/sql/SQLStore.java +++ b/src/main/java/com/ericsson/gerrit/plugins/eventslog/sql/SQLStore.java
@@ -125,7 +125,7 @@ } } catch (NoSuchProjectException e) { log.warn("Database contains a non-existing project, " + project.get() - + ", removing project from database", e); + + ", removing project from database"); eventsDb.removeProjectEvents(project.get()); } catch (IOException e) { log.warn("Cannot get project visibility info for " + project.get()