if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
  public void execute() {    if (infEventSub.hasChanged()) {      // for each new task      for (Enumeration en = infEventSub.getAddedList();           en.hasMoreElements();           ) {        InfrastructureEvent ie = (InfrastructureEvent)en.nextElement();        if (log.isDebugEnabled()) {          log.debug("handling added InfEvent: "+ie);        }        if (ie.isWireType()) {          // MessageTransport degradation          //          // ignore the transit time:          //   (System.currentTimeMillis() - ie.getTime())          // and just degrade as instructed:          try {            mtController.degradeReleaseRate(                (1.0 - ie.getIntensity()),                ie.getDuration());            if (log.isDebugEnabled()) {              log.debug(                  " MessageTransport degraded by "+                  ((int)(100.0 * ie.getIntensity()))+                  "% for "+ie.getDuration()+" milliseconds");            }          } catch (Exception e) {            // illegal parameters?            if(log.isDebugEnabled()) {              log.error(" unable to degrade MessageTransport", e);            }          }        } else {          // CPU-degradation not implemented yet        }      }    }  }