} else if ("request-log".equals(props.value)) {
RequestLogHandler requestLogHandler = new RequestLogHandler();
NCSARequestLog requestLog = new NCSARequestLog();
if (props.getProperty("filename") != null) {
requestLog.setFilename(props.getProperty("filename").value);
}
if (props.getProperty("append") != null) {
requestLog.setAppend("true".equalsIgnoreCase(props.getProperty("append").value));
}
if (props.getProperty("extended") != null) {
requestLog.setExtended("true".equalsIgnoreCase(props.getProperty("extended").value));
}
if (props.getProperty("timezone") != null) {
requestLog.setLogTimeZone(props.getProperty("timezone").value);
}
if (props.getProperty("date-format") != null) {
requestLog.setLogDateFormat(props.getProperty("date-format").value);
}
if (props.getProperty("retain-days") != null) {
int days = 90;
try {
days = Integer.parseInt(props.getProperty("retain-days").value);
} catch (NumberFormatException e) {
days = 90;
}
requestLog.setRetainDays(days);
}
requestLogHandler.setRequestLog(requestLog);
server.addHandler(requestLogHandler);
}