Polish Undertow access logs contribution

- Apply project’s code formatting and conventions
 - Don’t use the IO and worker thread configuration when creating the
   worker for the AccessLogReceiver. The IO and worker thread
   configuration is for HTTP request processing and a worker in its
   default configuration should be sufficient for the access log
   receiver.
 - Don’t use a temporary directory as the default for the access log
   directory. A temporary directory makes (some) sense for Tomcat as it
   requires a directory for its basedir. Undertow has no such
   requirement and using a temporary directory makes it hard to locate
   the logs. The default has been updated to a directory named logs,
   created in the current working directory.
 - Document the new properties in the application properties appendix

Closes gh-3014
This commit is contained in:
Andy Wilkinson
2015-05-20 10:31:27 +01:00
parent 90e43737bb
commit 95f31b0d30
6 changed files with 56 additions and 60 deletions

View File

@@ -582,7 +582,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
/**
* Format pattern for access logs.
*/
private String accessLogPattern;
private String accessLogPattern = "common";
/**
* Enable access log.
@@ -590,9 +590,9 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
private boolean accessLogEnabled = false;
/**
* Undertow access log directory. If not specified a temporary directory will be used.
* Undertow access log directory.
*/
private File accessLogDir;
private File accessLogDir = new File("logs");
public Integer getBufferSize() {
return this.bufferSize;
@@ -635,7 +635,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public String getAccessLogPattern() {
return accessLogPattern;
return this.accessLogPattern;
}
public void setAccessLogPattern(String accessLogPattern) {
@@ -643,7 +643,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public boolean isAccessLogEnabled() {
return accessLogEnabled;
return this.accessLogEnabled;
}
public void setAccessLogEnabled(boolean accessLogEnabled) {
@@ -651,7 +651,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
public File getAccessLogDir() {
return accessLogDir;
return this.accessLogDir;
}
public void setAccessLogDir(File accessLogDir) {