private static void initialize() {
        Path logDir = FileSystems.getDefault().getPath("./log");
        try {
            if ( !Files.isDirectory(logDir) )
                Files.createDirectory(logDir);

            logger = Logger.getLogger("Client");
            handler = new FileHandler("log/error.log", true);
            handler.setFormatter( new SimpleFormatter() );
            logger.addHandler(handler);
            loggingEnabled = true;
        } catch (IOException e) {
            loggingEnabled = false;
            System.err.println("Logování do souboru je zakázáno.");
        }
    }