You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:26:20 UTC
[sling-org-apache-sling-tracer] 36/49: SLING-6089 - Log Tracer does
not work with system having new HTTP whiteboard implementation
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tracer.git
commit 1784d4b91e0a89a07fa7d400a2ad3353fe50788b
Author: Chetan Mehrotra <ch...@apache.org>
AuthorDate: Mon Oct 3 10:59:38 2016 +0000
SLING-6089 - Log Tracer does not work with system having new HTTP whiteboard implementation
Register the filter with both old and new properties
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1763153 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/tracer/internal/LogTracer.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/tracer/internal/LogTracer.java b/src/main/java/org/apache/sling/tracer/internal/LogTracer.java
index ea531ba..c9ec0e6 100644
--- a/src/main/java/org/apache/sling/tracer/internal/LogTracer.java
+++ b/src/main/java/org/apache/sling/tracer/internal/LogTracer.java
@@ -111,8 +111,9 @@ public class LogTracer {
private static final String PROP_TRACER_ENABLED = "enabled";
private static final boolean PROP_TRACER_SERVLET_ENABLED_DEFAULT = false;
- @Property(label = "Servlet Enabled",
- description = "Enable the Tracer Servlet",
+ @Property(label = "Recording Servlet Enabled",
+ description = "Enable the Tracer Servlet. This servlet is required for the tracer recording feature " +
+ "to work and provides access to the json dump of the recording performed",
boolValue = PROP_TRACER_SERVLET_ENABLED_DEFAULT
)
private static final String PROP_TRACER_SERVLET_ENABLED = "servletEnabled";
@@ -270,6 +271,15 @@ public class LogTracer {
Dictionary<String, Object> filterProps = new Hashtable<String, Object>();
filterProps.put("pattern", "/.*");
+
+ //Do not use constant name to keep dependency as optional
+ //filterProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN, "/");
+ //filterProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT,
+ // "(" + HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=*)");
+
+ filterProps.put("osgi.http.whiteboard.filter.pattern", "/");
+ filterProps.put("osgi.http.whiteboard.context.select",
+ "(osgi.http.whiteboard.context.name=*)");
filterProps.put(Constants.SERVICE_DESCRIPTION, "Servlet Filter required for Log Tracer");
filterRegistration = context.registerService(Filter.class.getName(),
new TracerFilter(), filterProps);
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.