Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Logging broken when first argument is an element #2145

@dodgex

Description

@dodgex

While working on #2143 I found that for some places the logging might be broken.

e.g.

results in the message:

17:54:26.825 [Task worker for ':' Thread 2] ERROR o.a.i.p.ModelProcessor:203 - Skip element because it's abstract

This happens as the signatures of the trace methods are

void trace(String message, Object... args);
void trace(String message, Element element, Object... args);

Instead of using the first (and in this case desired version) the compiler uses the second version of trace as the first parameter after the message is an Element adn so it is not usedas replacement for the {} the log message but the message (without a valuefor {}) is attached to the element.

I think we should review all places where we use these logs and possibly even refactor the logger to avoid similar issues. maybe move the element in front of the string parameter?

@WonderCsabo wdyt?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions