DaanHoogland commented on a change in pull request #4707:
URL: https://github.com/apache/cloudstack/pull/4707#discussion_r578499510



##########
File path: server/src/main/java/org/apache/cloudstack/ha/HAManagerImpl.java
##########
@@ -298,14 +308,10 @@ public Boolean isVMAliveOnHost(final Host host) throws 
Investigator.UnknownVM {
         final HAConfig haConfig = haConfigDao.findHAResource(host.getId(), 
HAResource.ResourceType.Host);
         if (haConfig != null) {
             if (haConfig.getState() == HAConfig.HAState.Fenced) {
-                if (LOG.isDebugEnabled()){
-                    LOG.debug("HA: Host is fenced " + host.getId());
-                }
+                LOG.debug(String.format("HA: Host [%s] is fenced.", 
host.getId()));

Review comment:
       please put those checks back in

##########
File path: server/src/main/java/org/apache/cloudstack/ha/HAManagerImpl.java
##########
@@ -156,19 +156,16 @@ public boolean transitionHAState(final HAConfig.Event 
event, final HAConfig haCo
             if (result) {
                 final String message = String.format("Transitioned host HA 
state from:%s to:%s due to event:%s for the host id:%d",
                         currentHAState, nextState, event, 
haConfig.getResourceId());
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace(message);
-                }
+                LOG.debug(message);

Review comment:
       why do we need to up this level?
   also why remove the isEnabled check? I'd rather move the message creation 
inside such a check.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to