diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java b/server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java index 54e893240bd..18792c1676f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java +++ b/server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java @@ -31,8 +31,9 @@ import org.sonar.process.Props; class TomcatAccessLog { - public static final String PROPERTY_ENABLE = "sonar.web.accessLogs.enable"; - public static final String PROPERTY_PATTERN = "sonar.web.accessLogs.pattern"; + private static final String PROPERTY_ENABLE = "sonar.web.accessLogs.enable"; + private static final String PROPERTY_PATTERN = "sonar.web.accessLogs.pattern"; + private static final String DEFAULT_SQ_ACCESS_LOG_PATTERN = "%h %l %u [%t] \"%r\" %s %b \"%i{Referer}\" \"%i{User-Agent}\" \"%reqAttribute{ID}\""; void configure(Tomcat tomcat, Props props) { tomcat.setSilent(true); @@ -48,7 +49,7 @@ class TomcatAccessLog { FileAppender appender = policy.createAppender("ACCESS_LOG"); PatternLayoutEncoder fileEncoder = new PatternLayoutEncoder(); fileEncoder.setContext(valve); - fileEncoder.setPattern(props.value(PROPERTY_PATTERN, "combined")); + fileEncoder.setPattern(props.value(PROPERTY_PATTERN, DEFAULT_SQ_ACCESS_LOG_PATTERN)); fileEncoder.start(); appender.setEncoder(fileEncoder); appender.start(); |