public JobLog getJobLog(PlatformLayerKey jobKey, String executionId, int logSkip) throws OpsException {
JobExecutionData execution = findExecution(jobKey, executionId);
Date startedAt = execution.getStartedAt();
if (execution.getEndedAt() == null) {
JobLog log = operationQueue.getActiveJobLog(jobKey, executionId);
if (log != null) {
JobLog ret = new JobLog();
ret.lines = Lists.newArrayList(Iterables.skip(log.lines, logSkip));
ret.execution = log.execution;
return ret;
}
}
try {
String cookie = execution.logCookie;
JobLog log = jobLogStore.getJobLog(startedAt, jobKey, executionId, cookie, logSkip);
if (log != null) {
log.execution = execution;
}
return log;
} catch (IOException e) {