Add a toString() to Java agent's EventRule
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Tue, 15 Sep 2015 17:57:09 +0000 (13:57 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Oct 2015 21:23:38 +0000 (17:23 -0400)
Helps with debugging and eventually for pretty-printing.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/session/EventRule.java
liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/session/LogLevelSelector.java

index c25045d979eb500e38c45d6ba870c655821ed94a..8af51a3859594a340ef43589c76706e3c251bffa 100644 (file)
@@ -131,4 +131,10 @@ public class EventRule {
                return true;
        }
 
+       @Override
+       public String toString() {
+               return "Event name = " + getEventName() +
+               ", Log level selector = (" + getLogLevelSelector().toString() + ")" +
+               ", Filter string = " + getFilterString();
+       }
 }
index 87d4172cee1cd8b40aca40825b5bca340fb4d9a6..f6f6a396ad2701f4e146f769204e14290ba13458 100644 (file)
@@ -188,4 +188,12 @@ public class LogLevelSelector {
                }
                return true;
        }
+
+       @Override
+       public String toString() {
+               if (getLogLevelType() == LogLevelType.LTTNG_EVENT_LOGLEVEL_ALL) {
+                       return LogLevelType.LTTNG_EVENT_LOGLEVEL_ALL.toString();
+               }
+               return String.valueOf(getLogLevel()) + ", " + getLogLevelType().toString();
+       }
 }
This page took 0.025842 seconds and 4 git commands to generate.