logOutFileName = System.getProperty("selenium.log");
}
if (logOutFileName!=null) {
try {
File logFile = new File(logOutFileName);
FileHandler fileHandler = seleniumFileHandlers.get(logFile);
if (fileHandler == null) {
fileHandler = new FileHandler(logFile.getAbsolutePath());
seleniumFileHandlers.put(logFile, fileHandler);
}
fileHandler.setFormatter(new TerseFormatter(true));
logger.setLevel(Level.FINE);
fileHandler.setLevel(Level.FINE);
logger.addHandler(fileHandler);
log.info("Writing debug logs to " + logFile.getAbsolutePath());
} catch (IOException e) {
throw new RuntimeException(e);
}