String fileName = "debug.txt"; try { handler = new FileHandler(fileName ); handler.setFormatter(new SimpleFormatter()); logger.addHandler(handler); } catch (IOException e) { System.err.println("Could not start Logging System with logging to file '" + fileName + "': "); e.printStackTrace();
String fileName = getLogToFile(); if ( fileName != null ) { try { handler = new FileHandler(fileName ); handler.setFormatter(new SimpleFormatter()); logger.addHandler(handler); } catch (IOException e) { System.err.println("Could not start Logging System with logging to file '" + fileName + "': "); e.printStackTrace(); }
    private LoggingSystem() {        loggerOn(true);        String fileName = "debug.txt";        try {            handler = new FileHandler(fileName );            handler.setFormatter(new SimpleFormatter());            logger.addHandler(handler);        } catch (IOException e) {            System.err.println("Could not start Logging System with logging to file '" + fileName + "': ");            e.printStackTrace();        }    }