void (String message, String level) { if (message.isEmpty()) return; try { while (message.charAt(0) == '\n') message = message.substring(1); if (level != null) message = level + ": " + message; if (!message.endsWith("\n")) message += "\n"; FileUtil.appendToFile(reportFile(), message); } catch (IOException e) { LOG.error(e); } }