void (List<? extends Printable> currentPrintables) { if (myOutputFile != null && new File(myOutputFile).isFile()) { try (PrintStream printStream = new PrintStream(new FileOutputStream(myOutputFile, true))) { for (Printable currentPrintable : currentPrintables) { currentPrintable.printOn(new Printer() { @Override public void print(@NotNull String text, @NotNull ConsoleViewContentType contentType) { if (contentType != ConsoleViewContentType.SYSTEM_OUTPUT) { printStream.print(text); } } @Override public void printHyperlink(@NotNull String text, HyperlinkInfo info) { printStream.print(text); } @Override public void onNewAvailable(@NotNull Printable printable) {} @Override public void mark() {} }); } } catch (IOException e) { LOG.error(e); } } }