class LogCodes {

    public static String getLog(String code) {
        if (!LOG_CODES.containsKey(code)) {
            LOGGER.error(CODE_DOES_NOT_EXIST + code);
            return CODE_DOES_NOT_EXIST + code;
        }
        try {
            return String.format(LOG, code, LOG_CODES.get(code), LogCodes.NOTE);
        } catch (Throwable e) {
            LOGGER.error(LOG_FORMAT_ERROR + code, e);
        }
        return LOG_FORMAT_ERROR + code;
    }

}