Skip to content

Conversation

@rbygrave
Copy link
Contributor

@rbygrave rbygrave commented May 15, 2025

As per issue #264, when using GraalVM native-image using System.getLogger() directly is problematic for class initialisation. Using AppLog.getLogger() adds that one level of indirection that means we can successfully redirect the log messages to sl4j4-api and onto whatever backend is setup for that.

… native-image

As per issue #263, when using GraalVM native-image using System.getLogger() directly is problematic for class initialisation. Using AppLog.getLogger() adds that one level of indirection that means we can successfully redirect the log messages to sl4j4-api and onto whatever backend is setup for that.
@rbygrave rbygrave requested a review from SentryMan May 15, 2025 20:27
@rbygrave rbygrave self-assigned this May 15, 2025
@rbygrave rbygrave changed the title #263 Use AppLog.getLogger() rather than direct System.getLogger() for native-image #264 Use AppLog.getLogger() rather than direct System.getLogger() for native-image May 15, 2025
Copy link
Collaborator

@SentryMan SentryMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When stable values are finalized I'll change it back

@SentryMan SentryMan merged commit 0397c10 into master May 16, 2025
11 checks passed
@SentryMan SentryMan deleted the feature/use-AppLog branch May 16, 2025 01:20
@rbygrave
Copy link
Contributor Author

When stable values are finalized I'll change it back

My gut says stable values won't "fix" this issue.

I'll change it back

I'd tend to think that we'd discuss the pro's and con's and review the decision with what we know at that time. It's kinda not great to try and make a "decision too early" as I see it.

@SentryMan
Copy link
Collaborator

That we'll test it first and confirm whether it's good goes without saying

@rbygrave
Copy link
Contributor Author

it's good goes without saying

Yeah, that wasn't the point I was trying to make. I was trying to say that ... we need to review the decision again at the time.

That is, if stable values "works" that actually isn't sufficient for a good decision per se. We'd need to review the pros and cons again at that time - we need to stay open to all options.

@SentryMan
Copy link
Collaborator

SentryMan commented May 18, 2025

it's good goes without saying

Not what I meant.

@SentryMan SentryMan added this to the 3.3 milestone Jun 5, 2025
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

Successfully merging this pull request may close these issues.

GraalVM native-image build fails with slf4j-jdk-platform-logging - an issue due to use of System.getLogger()

3 participants