Hi,
i’ve written a custom LogEntry by extending the SimpleLogEntry
-class (see below).
MyLogEntry.class
public class MyLogEntry extends SimpleLogEntry {
public MyLogEntry(@NotNull String log) {
super(log);
}
public MyLogEntry(@NotNull String log, @Nullable Date time) {
super(log, time);
}
@Override
public String getLog() {
return "<div>" + getUnstyledLog() + "</div>";
}
@Override
public String getCssStyle() {
return "bambooMyLog";
}
@Override
public LogEntry cloneAndMutate(final String newUnstyledLog) {
return new MyLogEntry(newUnstyledLog, getDate());
}
}
Now i want to filter for entries of that type by using
final BuildLogFileAccessor fileAccessor = buildLogFileAccessorFactory.createBuildLogFileAccessor(buildResultsSummary.getPlanKey(), buildResultsSummary.getBuildNumber());
List<LogEntry> myLogs = fileAccessor.getLastNLogsOfType(1000, Lists.newArrayList(MyLogEntry.class));
Unfortunately this list remains empty. When i add SimpleLogEntry.class
to the ArrayList my logs appear together with all the other logs. I’ve not found which attribute i need to overwrite so the fileAccessor-filtering works as expected.