Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging in WebComponentExporterUtils should be using WARN and not TRACE #9855

Closed
Artur- opened this issue Jan 21, 2021 · 1 comment · Fixed by #10507
Closed

Logging in WebComponentExporterUtils should be using WARN and not TRACE #9855

Artur- opened this issue Jan 21, 2021 · 1 comment · Fixed by #10507

Comments

@Artur-
Copy link
Member

Artur- commented Jan 21, 2021

Description of the bug / feature

Say that you create this

public static class HelloWorldExporter extends WebComponentExporter<HelloWorld> {

        protected HelloWorldExporter() {
            super("hello-world");
        }

        @Override
        protected void configureInstance(WebComponent<HelloWorld> webComponent, HelloWorld component) {

        }

    }

The intent is pretty clear: you want HelloWorld to be exported as <hello-world>
It does not work and no warnings are logged. It is unclear what to do next.

WebComponentExportedUtils.isEligible notices the problem and logs, with TRACE level

                    "Class {} has no public no-argument constructor, and won't be instantiated as a '{}' by default",

This and the other errors in isEligible should be at least WARN so that you see what is wrong.

@denis-anisimov
Copy link
Contributor

Even though it looks like an enhancement I set it as a bug because you won't be able to detect any problems if you don't use TRACE level which is quite rare.

I thought we have checks for protected CTOR specifically for the exporter for some other reasons which I don't recall already.

@denis-anisimov denis-anisimov self-assigned this Mar 30, 2021
OLD Vaadin Flow bugs & maintenance (Vaadin 10+) automation moved this from WIP to Closed Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment