Cannot filter for custom LogEntry

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.

turns out that it’s not possible to add custom LogEntry-Types to Bamboo.

See convertToLogFileEntry() in BuildLogUtils.class, which is called to create persistent logs. Here the four default LogEntry types are hardcoded with SimpleLogEntry as fallback…

    public static String convertToLogFileEntry(@NotNull LogEntry logEntry) {
        StringBuilder fileEntry = new StringBuilder();
        if (logEntry instanceof ErrorLogEntry) {
            fileEntry.append("error");
        } else if (logEntry instanceof BuildOutputLogEntry) {
            fileEntry.append("build");
        } else if (logEntry instanceof CommandLogEntry) {
            fileEntry.append("command");
        } else {
            fileEntry.append("simple");
        }

        fileEntry.append("\t").append(logEntry.getFormattedDate());
        fileEntry.append("\t");
        String logText = logEntry.getUnstyledLog();
        if (logText != null) {
            logText = StringUtils.remove(logText, '\n');
            fileEntry.append(logText);
        }

        return fileEntry.toString();
    }

Maybe i’ll just add a prefix to all log messages of my custom TaskType so i can filter for them in Results frontend later.