Author: cziegeler
Date: Tue Feb 26 13:07:31 2019
New Revision: 1854376

URL: http://svn.apache.org/viewvc?rev=1854376&view=rev
Log:
FELIX-6047 : Delegate timezone and date format properties to Jetty. Apply patch 
from Steven Huypens

Modified:
    
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java
    
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java

Modified: 
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java?rev=1854376&r1=1854375&r2=1854376&view=diff
==============================================================================
--- 
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java
 (original)
+++ 
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java
 Tue Feb 26 13:07:31 2019
@@ -58,6 +58,12 @@ class FileRequestLog {
         delegate.setLogCookies(config.isRequestLogFileLogCookies());
         delegate.setLogServer(config.isRequestLogFileLogServer());
         delegate.setLogLatency(config.isRequestLogFileLogLatency());
+        if (config.getRequestLogDateFormat() != null) {
+            delegate.setLogDateFormat(config.getRequestLogDateFormat());
+        }
+        if (config.getRequestLogTimeZone() != null) {
+            delegate.setLogTimeZone(config.getRequestLogTimeZone());
+        }
     }
 
     synchronized void start(BundleContext context) throws IOException, 
IllegalStateException {

Modified: 
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java?rev=1854376&r1=1854375&r2=1854376&view=diff
==============================================================================
--- 
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
 (original)
+++ 
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
 Tue Feb 26 13:07:31 2019
@@ -216,6 +216,12 @@ public final class JettyConfig
     /** Felix specific property to enable request logging request processing 
time in the request log file*/
     public static final String FELIX_HTTP_REQUEST_LOG_FILE_LOG_LATENCY = 
"org.apache.felix.http.requestlog.file.loglatency";
 
+    /** Felix specific property to specify the date format used for the 
logging timestamps*/
+    public static final String FELIX_HTTP_REQUEST_LOG_FILE_DATE_FORMAT = 
"org.apache.felix.http.requestlog.file.logdateformat";
+
+    /** Felix specific property to specify the timezone used for the logging 
timestamps*/
+    public static final String FELIX_HTTP_REQUEST_LOG_FILE_TIMEZONE = 
"org.apache.felix.http.requestlog.file.timezone";
+
     /** Felix specific property to define custom properties for the http 
runtime service. */
     public static final String FELIX_CUSTOM_HTTP_RUNTIME_PROPERTY_PREFIX = 
"org.apache.felix.http.runtime.init.";
 
@@ -582,6 +588,14 @@ public final class JettyConfig
         return getBooleanProperty(FELIX_HTTP_REQUEST_LOG_FILE_LOG_LATENCY, 
false);
     }
 
+    public String getRequestLogDateFormat() {
+        return getProperty(FELIX_HTTP_REQUEST_LOG_FILE_DATE_FORMAT, null);
+    }
+
+    public String getRequestLogTimeZone() {
+        return getProperty(FELIX_HTTP_REQUEST_LOG_FILE_TIMEZONE, null);
+    }
+
 
     public boolean isGzipHandlerEnabled() {
         return getBooleanProperty(FELIX_JETTY_GZIP_HANDLER_ENABLE, false);


Reply via email to