}
}
server.addListener(listener);
}
} else if ("request-log".equals(props.value)) {
NCSARequestLog rl = new NCSARequestLog();
if (props.getProperty("filename") != null) {
rl.setFilename(props.getProperty("filename").value);
}
if (props.getProperty("append") != null) {
rl.setAppend("true".equalsIgnoreCase(props.getProperty("append").value));
}
if (props.getProperty("buffered") != null) {
rl.setBuffered("true".equalsIgnoreCase(props.getProperty("buffered").value));
}
if (props.getProperty("extended") != null) {
rl.setExtended("true".equalsIgnoreCase(props.getProperty("extended").value));
}
if (props.getProperty("timezone") != null) {
rl.setLogTimeZone(props.getProperty("timezone").value);
}
if (props.getProperty("date-format") != null) {
rl.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;
}
rl.setRetainDays(days);
}
server.setRequestLog(rl);
}
}
return server;