public static Logger getLogger() {
        if (LOGGER == null) {
            LOGGER = Logger.getLogger(LOGGER_NAME);
            final SimpleLayout layout = new SimpleLayout();
            LOGGER.addAppender(new ConsoleAppender(layout));

            final HTMLLayout layout2 = new HTMLLayout();
            try {
                LOGGER.addAppender(new FileAppender(layout2, Constants.PROGRAM_PATH.resolve(LOGGER_FILE).toString(), true));

            } catch (IOException e) {
                LOGGER.warn("Can't create FileAppender for " + Constants.PROGRAM_PATH.resolve(LOGGER_FILE).toFile().getAbsolutePath(), e);
            }
        }

        if (LOGGER != null) {
            LOGGER.setLevel(LOG_LEVEL);
        }

        return LOGGER;
    }