@ -1,5 +1,5 @@
/ *
* Copyright 2012 - 201 5 the original author or authors .
* Copyright 2012 - 201 6 the original author or authors .
*
* Licensed under the Apache License , Version 2.0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -1019,7 +1019,7 @@ public class ServerProperties
@Deprecated
@DeprecatedConfigurationProperty ( replacement = "server.undertow.accesslog.enabled" )
public boolean isAccessLogEnabled ( ) {
return this . accesslog . isEnabled( ) ;
return Boolean . TRUE . equals ( this . accesslog . getEnabled( ) ) ;
}
/ * *
@ -1055,14 +1055,30 @@ public class ServerProperties
void customizeUndertow ( ServerProperties serverProperties ,
UndertowEmbeddedServletContainerFactory factory ) {
factory . setBufferSize ( this . bufferSize ) ;
factory . setBuffersPerRegion ( this . buffersPerRegion ) ;
factory . setIoThreads ( this . ioThreads ) ;
factory . setWorkerThreads ( this . workerThreads ) ;
factory . setDirectBuffers ( this . directBuffers ) ;
factory . setAccessLogDirectory ( this . accesslog . dir ) ;
factory . setAccessLogPattern ( this . accesslog . pattern ) ;
factory . setAccessLogEnabled ( this . accesslog . enabled ) ;
if ( this . bufferSize ! = null ) {
factory . setBufferSize ( this . bufferSize ) ;
}
if ( this . buffersPerRegion ! = null ) {
factory . setBuffersPerRegion ( this . buffersPerRegion ) ;
}
if ( this . ioThreads ! = null ) {
factory . setIoThreads ( this . ioThreads ) ;
}
if ( this . workerThreads ! = null ) {
factory . setWorkerThreads ( this . workerThreads ) ;
}
if ( this . directBuffers ! = null ) {
factory . setDirectBuffers ( this . directBuffers ) ;
}
if ( this . accesslog . dir ! = null ) {
factory . setAccessLogDirectory ( this . accesslog . dir ) ;
}
if ( this . accesslog . pattern ! = null ) {
factory . setAccessLogPattern ( this . accesslog . pattern ) ;
}
if ( this . accesslog . enabled ! = null ) {
factory . setAccessLogEnabled ( this . accesslog . enabled ) ;
}
factory . setUseForwardHeaders ( serverProperties . getOrDeduceUseForwardHeaders ( ) ) ;
}
@ -1071,7 +1087,7 @@ public class ServerProperties
/ * *
* Enable access log .
* /
private boolean enabled = false ;
private Boolean enabled ;
/ * *
* Format pattern for access logs .
@ -1083,11 +1099,11 @@ public class ServerProperties
* /
private File dir = new File ( "logs" ) ;
public boolean is Enabled( ) {
public Boolean get Enabled( ) {
return this . enabled ;
}
public void setEnabled ( b oolean enabled ) {
public void setEnabled ( B oolean enabled ) {
this . enabled = enabled ;
}