Michael Kublin has uploaded a new change for review. Change subject: engine: Stop flood a logs by Autorecovering 0 .... ......................................................................
engine: Stop flood a logs by Autorecovering 0 .... The following message is not usefull, so when there will be more than 0 a log will work Change-Id: I68cd1b3c033b6a88d746737f0d0bcb61e37a3b66 Signed-off-by: Michael Kublin <mkub...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AutoRecoveryManager.java 1 file changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/60/11560/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AutoRecoveryManager.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AutoRecoveryManager.java index a0e3173..96b9031 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AutoRecoveryManager.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AutoRecoveryManager.java @@ -93,13 +93,15 @@ } log.debugFormat("Checking autorecoverable {0}" , logMsg); final List<T> fails = dao.listFailedAutorecoverables(); - final BackendInternal backend = getBackend(); - log.info("Autorecovering " + fails.size() + " " + logMsg); - for (final T fail : fails) { - log.info("Autorecovering " + logMsg + " id: " + fail.getId() + getHostName(fail)); - final VdcActionParametersBase actionParams = paramsCallback.doWith(fail); - actionParams.setShouldBeLogged(true); - backend.runInternalAction(actionType, actionParams); + if (fails.size() > 0) { + final BackendInternal backend = getBackend(); + log.info("Autorecovering " + fails.size() + " " + logMsg); + for (final T fail : fails) { + log.info("Autorecovering " + logMsg + " id: " + fail.getId() + getHostName(fail)); + final VdcActionParametersBase actionParams = paramsCallback.doWith(fail); + actionParams.setShouldBeLogged(true); + backend.runInternalAction(actionType, actionParams); + } } log.debugFormat("Checking autorecoverable {0} done",logMsg); } -- To view, visit http://gerrit.ovirt.org/11560 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68cd1b3c033b6a88d746737f0d0bcb61e37a3b66 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Michael Kublin <mkub...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches