Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FELIX-6047 - Delegate timezone and date format properties to Jetty #173

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion healthcheck/docs/felix-health-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.";

Expand Down Expand Up @@ -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);
Expand Down