The following example illustrates how the StackFilter annotation can
be used to remove the Logger::log method in a stack trace:
package com.example;
@Name("example.LogMessage")
@Label("Log Message")
@StackFilter("com.example.Logger::log")
class LogMessage extends Event {
@Label("Message")
String message;
}
public class Logger {
public static void log(String message) {
System.out.print(Instant.now() + " : " + message);
LogMessage event = new LogMessage();
event.message = message;
event.commit();
}
}
| Modifier and Type | Method and Description |
|---|---|
| public String[] | Returns: the method names, notnullThe methods or classes that should not be part of an event stack trace. |
| value | back to summary |
|---|---|
| public String[] value() The methods or classes that should not be part of an event stack trace.
A filter is formed by using the fully qualified class name concatenated with
the method name using
If only the name of a class is specified, for example Methods can't be qualified using method parameters or return types. Instance methods belonging to an interface can't be filtered out. Wilcards are not permitted.
| |