writeln(taskStr); }
  protected void logTask(Task aTask, boolean expandTimestamp, boolean isCountedTask) {    if (aTask == null) {      return;    }    String taskStr = buildTaskPrefixString(aTask);    long startTime = -1;    if (TaskUtils.getPreferenceBest(aTask, AspectType.START_TIME) == null) {      taskStr += ",";    } else {      startTime = TaskUtils.getStartTime(aTask);      if (isCountedTask &&          (TaskUtils.isProjection(aTask))) {        startTime = logInvPG.getEffectiveProjectionStart(aTask, startTime);      }      taskStr = taskStr + getDateString(startTime, expandTimestamp) + ",";    }    taskStr = taskStr + getDateString(TaskUtils.getEndTime(aTask), expandTimestamp) + ",";//This is qty for supply, daily rate for projection    try {      taskStr = taskStr + taskUtils.getDailyQuantity(aTask);    } catch (ClassCastException e) {      logger.error("Formatter:Problem task and the print out is :\n" + taskUtils.taskDesc(aTask));      throw e;    } catch (RuntimeException re) {      if (re.getMessage().indexOf("Assertion botch:") > -1){      String errorString = "Assertion Botch: start time: " + startTime;      errorString += (" end time: " + TaskUtils.getEndTime(aTask));      double d = taskUtils.getQuantity(aTask); // don't print me!!!      long dbits = Double.doubleToLongBits(d);      long rbits = Double.doubleToRawLongBits(d);      errorString += ("quantity_d: " + Long.toHexString(dbits));      errorString += ("quantity_r: " + Long.toHexString(rbits));      logger.error(errorString);    }    throw re;  // re-throw for now  }  writeln(taskStr);}