Search in sources :

Example 1 with AccessLogReceiver

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);
    }
}
Also used : AccessLogHandler(io.undertow.server.handlers.accesslog.AccessLogHandler) DefaultAccessLogReceiver(io.undertow.server.handlers.accesslog.DefaultAccessLogReceiver) AccessLogReceiver(io.undertow.server.handlers.accesslog.AccessLogReceiver) DefaultAccessLogReceiver(io.undertow.server.handlers.accesslog.DefaultAccessLogReceiver) IOException(java.io.IOException) Undertow(io.undertow.Undertow)

Aggregations

Undertow (io.undertow.Undertow)1 AccessLogHandler (io.undertow.server.handlers.accesslog.AccessLogHandler)1 AccessLogReceiver (io.undertow.server.handlers.accesslog.AccessLogReceiver)1 DefaultAccessLogReceiver (io.undertow.server.handlers.accesslog.DefaultAccessLogReceiver)1 IOException (java.io.IOException)1