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

Support for SLF4J 2.x #918

Open
hohwille opened this issue May 5, 2024 · 0 comments
Open

Support for SLF4J 2.x #918

hohwille opened this issue May 5, 2024 · 0 comments

Comments

@hohwille
Copy link
Contributor

hohwille commented May 5, 2024

The SLF4J Logger API has been extended in version 2.x and now supports fluent logging:
https://www.slf4j.org/manual.html#fluent

When using this in a library that ends up in client code then TeaVM fails with such error:

[INFO] Running TeaVM
[INFO] Output file built with errors
[ERROR] Method org.slf4j.Logger.atLevel(Lorg/slf4j/event/Level;)Lorg/slf4j/spi/LoggingEventBuilder; was not found
    at io.github.mmm.scanner.SimpleTextFormatMessageHandler.log(SimpleTextFormatMessageHandler.java:59)
    at io.github.mmm.scanner.SimpleTextFormatMessageHandler.handle(SimpleTextFormatMessageHandler.java:67)
    at io.github.mmm.base.text.AbstractTextFormatMessageHandler.add(AbstractTextFormatMessageHandler.java:35)
    at io.github.mmm.scanner.AbstractCharStreamScanner.addMessage(AbstractCharStreamScanner.java:129)
    at io.github.mmm.base.text.TextFormatProcessor.addMessage(TextFormatProcessor.java:53)
    at io.github.mmm.base.text.TextFormatProcessor.addWarning(TextFormatProcessor.java:29)
    at io.github.mmm.scanner.AbstractCharStreamScanner.expectOne(AbstractCharStreamScanner.java:594)
    at io.github.mmm.scanner.CharStreamScanner.expectOne(CharStreamScanner.java:786)
    at io.github.mmm.nls.formatter.impl.plugin.NlsFormatterPluginChoice.parseCondition(NlsFormatterPluginChoice.java:149)
    at io.github.mmm.nls.formatter.impl.plugin.NlsFormatterPluginChoice.parseChoice(NlsFormatterPluginChoice.java:111)
    at io.github.mmm.nls.formatter.impl.plugin.NlsFormatterPluginChoice.<init>(NlsFormatterPluginChoice.java:88)
    at io.github.mmm.nls.formatter.impl.NlsFormatterManagerImpl.getFormatter(NlsFormatterManagerImpl.java:66)
    at io.github.mmm.nls.variable.impl.NlsVariableParserImpl.parse(NlsVariableParserImpl.java:45)
    at io.github.mmm.nls.formatter.impl.NlsMessageFormatterImpl.<init>(NlsMessageFormatterImpl.java:51)
    at io.github.mmm.nls.impl.NlsMessageImpl.getLocalizedMessage(NlsMessageImpl.java:94)
    at io.github.mmm.nls.NlsMessage.getLocalizedMessage(NlsMessage.java:92)
    at io.github.mmm.validation.ValidationFailure.getLocalizedMessage(ValidationFailure.java:71)
    at io.github.mmm.ui.spi.widget.AbstractUiNativeWidget.validate(AbstractUiNativeWidget.java:442)
    at io.github.mmm.ui.spi.widget.AbstractUiNativeWidget.validateDown(AbstractUiNativeWidget.java:430)
    at io.github.mmm.ui.api.widget.UiWidget.validate(UiWidget.java:253)
    at io.github.mmm.ui.api.widget.UiWidget.validate(UiWidget.java:235)
    at io.github.mmm.ui.tvm.widget.input.TvmInput.onFocusLoss(TvmInput.java:341)
    at io.github.mmm.ui.tvm.widget.input.TvmRadioChoice$<init>$lambda$_0_1.handleEvent(TvmRadioChoice.java:42)
    at io.github.mmm.ui.tvm.widget.input.TvmRadioChoice$<init>$lambda$_0_1.handleEvent$exported$0

Method atLevel and according stuff needs to be implemented here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant