public void setLogger() {
        String loggerName = me.toString();
        if(this instanceof Scout)
            loggerName = ((Scout)this).leader.me.toString();
        else if(this instanceof Commander)
            loggerName = ((Commander)this).leader.me.toString();
        logger = Logger.getLogger(loggerName);
        logger.setUseParentHandlers(false);
        logger.setLevel(Level.FINER);
        Handler consoleHandler = null;
        for (Handler handler : logger.getHandlers()) {
            if (handler instanceof ConsoleHandler) {
                consoleHandler = handler;
                break;
            }
        }
        if (consoleHandler == null) {
            //there was no console handler found, create a new one
            consoleHandler = new ConsoleHandler();
            logger.addHandler(consoleHandler);
        }
        consoleHandler.setLevel(Level.CONFIG);
        if(!(this instanceof Scout || this instanceof Commander)) {
            try {
                boolean clean = Boolean.parseBoolean(prop.getProperty("clean"));
                FileHandler fileHandler = new FileHandler("log/Log" + loggerName + ".log", !clean);
                fileHandler.setLevel(Level.FINER);
                logger.addHandler(fileHandler);
                SimpleFormatter formatter = new SimpleFormatter();
                fileHandler.setFormatter(formatter);

            } catch (SecurityException e) {
                logger.log(Level.SEVERE, e.getMessage());
            } catch (IOException e) {
                logger.log(Level.SEVERE, e.getMessage());
            }
        }
    }