use of io.undertow.server.handlers.accesslog.AccessLogReceiver in project spring-boot by spring-projects.
the class UndertowServletWebServerFactory method createAccessLogHandler.
private AccessLogHandler createAccessLogHandler(HttpHandler handler) {
try {
createAccessLogDirectoryIfNecessary();
String prefix = (this.accessLogPrefix != null ? this.accessLogPrefix : "access_log.");
AccessLogReceiver accessLogReceiver = new DefaultAccessLogReceiver(createWorker(), this.accessLogDirectory, prefix, this.accessLogSuffix, this.accessLogRotate);
String formatString = (this.accessLogPattern != null) ? this.accessLogPattern : "common";
return new AccessLogHandler(handler, accessLogReceiver, formatString, Undertow.class.getClassLoader());
} catch (IOException ex) {
throw new IllegalStateException("Failed to create AccessLogHandler", ex);
}
}
Aggregations