*/
enum Domain {
/** The JUL (java.util.logging) domain */
- JUL("-j"), /** The log4j (org.apache.log4j) domain */
- LOG4J("-l");
+ JUL("--jul", ">=", Integer.MIN_VALUE), /** The log4j (org.apache.log4j) domain */
+ LOG4J("--log4j", ">=", Integer.MIN_VALUE),
+ LOG4J2("--log4j2", "<=", Integer.MAX_VALUE);
private final String flag;
+ private final String rangeOperator;
+ private final int levelAllValue;
- private Domain(String flag) {
+ private Domain(String flag, String rangeOperator, int levelAllValue) {
this.flag = flag;
+ this.rangeOperator = rangeOperator;
+ this.levelAllValue = levelAllValue;
}
/**
public String flag() {
return flag;
}
+
+ public String rangeOperator() {
+ return rangeOperator;
+ }
+
+ public int levelAllValue() {
+ return levelAllValue;
+ }
}
// ------------------------------------------------------------------------
*/
boolean disableAllEvents();
+ /**
+ * Get a list of events currently available (exposed by applications) in the
+ * session's domain.
+ *
+ * @return The list of available events
+ */
+ List<String> listEvents();
+
+ /**
+ * Enable an application context with the provided retriever/context names.
+ *
+ * There is currently no direct command to remove an existing context, the
+ * session has to be destroyed and re-created to do so.
+ *
+ * @param retrieverName
+ * The name of the retriever (or "namespace" of the context)
+ * @param contextName
+ * The name of the context
+ * @return If the command executed successfully (return code = 0)
+ */
+ boolean enableAppContext(String retrieverName, String contextName);
+
/**
* Start tracing
*