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

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?

Activity

  1. dodgex commented on Jun 10, 2018

    @dodgex
    MemberAuthor

    trace is only called twice. both times it is not intended to attach the message to the element. I'll remove that 3-arg version of trace at it imho makes no sense to have it (can we actually have trace messages on elements?!)

  2. dodgex commented on Jun 10, 2018

    @dodgex
    MemberAuthor

    same for debug

  3. dodgex commented on Jun 10, 2018

    @dodgex
    MemberAuthor

    aaaaaaaand info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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