From 5076676c6a15ed27aa864f220699b77a02277063 Mon Sep 17 00:00:00 2001 From: HUYPENS Steven Date: Mon, 28 Jan 2019 16:27:43 +0100 Subject: [PATCH 1/2] Delegate timezone and dateformat properties to Jetty --- .../felix/http/jetty/internal/FileRequestLog.java | 6 ++++++ .../felix/http/jetty/internal/JettyConfig.java | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java index 07ffbab2531..a1a97cfe1ec 100644 --- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java +++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/FileRequestLog.java @@ -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 { diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java index a4e13cab537..00d301f910c 100644 --- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java +++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java @@ -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 boolean isRequestLogFileLogLatency() { 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); From 7f9ee7a3d785cc9cff5933f4032872b3b04e6bb9 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 7 Jun 2019 14:30:20 +0200 Subject: [PATCH 2/2] Fix Typo in webconsole bundle reference --- healthcheck/docs/felix-health-checks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/healthcheck/docs/felix-health-checks.md b/healthcheck/docs/felix-health-checks.md index 8977fa4f7f8..d94614ac3bc 100644 --- a/healthcheck/docs/felix-health-checks.md +++ b/healthcheck/docs/felix-health-checks.md @@ -171,7 +171,7 @@ By default the HC servlet sends the CORS header `Access-Control-Allow-Origin: *` ### Webconsole plugin -If the `org.apache.felix.hc.webconsole` bundle is active, a webconsole plugin +If the `org.apache.felix.healthcheck.webconsoleplugin` bundle is active, a webconsole plugin at `/system/console/healthcheck` allows for executing health checks, optionally selected based on their tags (positive and negative selection, see the `HealthCheckFilter` mention above).