diff --git a/src/main/java/teammates/ui/webapi/CompileLogsAction.java b/src/main/java/teammates/ui/webapi/CompileLogsAction.java index b097f8ec836..d332fe9e98b 100644 --- a/src/main/java/teammates/ui/webapi/CompileLogsAction.java +++ b/src/main/java/teammates/ui/webapi/CompileLogsAction.java @@ -62,6 +62,12 @@ private List getErrorLogs() { EntryListOption.filter(logOptions.stream().collect(Collectors.joining("\n"))) ); + try { + logging.close(); + } catch (Exception e) { + // Ignore exception when closing resource + } + for (LogEntry logEntry : entries.iterateAll()) { logs.add(logEntry); }