/** * Gets the last lines from a suite log. * @param suite the suite to extract the log from * @param lineQty the number of lines to retrieve * @return string representation of log last lines * @throws IOException problem getting lines */ @SuppressWarnings("nls") protected final String getLogTail(final JobSuite suite, final int lineQty) throws IOException { StringBuffer logTail = new StringBuffer(); String[] lines = IOUtil.tail( suite.getLogManager().getLog(suite.getId()), lineQty); if (lines.length == 0) { logTail.append("*** No log found. ***\n"); } else { for (int i = 0; i < lines.length; i++) { String line = lines[i]; logTail.append(line); logTail.append('\n'); } } return logTail.toString(); } }