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

Add ALL level #452

Closed
wants to merge 1 commit into from
Closed

Add ALL level #452

wants to merge 1 commit into from

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Dec 8, 2023

@jamezp
Copy link
Member

jamezp commented Dec 8, 2023

Interesting, would it not inherit the level from java.util.logging.Level? We also don't have OFF.

@jamezp
Copy link
Member

jamezp commented Dec 8, 2023

Actually, I'm assuming any JUL levels would fail. I don't know enough about GraalVM to know how the inheritance works though.

@geoand
Copy link
Contributor Author

geoand commented Dec 8, 2023

It's not real inheritance though because the fields are static

@jamezp
Copy link
Member

jamezp commented Dec 8, 2023

Yeah. What generally happens is Level.parse(value) is used. That method is only in the java.util.logging.Level and it's static so it's also not real inheritance. I'm not sure how Quarkus resolves levels though.

@geoand
Copy link
Contributor Author

geoand commented Dec 11, 2023

Actually, I'm assuming any JUL levels would fail. I don't know enough about GraalVM to know how the inheritance works though.

Yeah, that's true. Do you want me to add OFF as well?

@geoand
Copy link
Contributor Author

geoand commented Dec 11, 2023

I'm not sure how Quarkus resolves levels though.

We use org.jboss.logmanager.Logger#setLevel.

@jamezp
Copy link
Member

jamezp commented Dec 11, 2023

I'm not sure how Quarkus resolves levels though.

We use org.jboss.logmanager.Logger#setLevel.

How is the Level created though? Do you use Level.parse()? The Logger.setLevel() requires a java.util.logging.Level argument so the level would need to be created before that method is invoked.

@geoand
Copy link
Contributor Author

geoand commented Dec 12, 2023

How is the Level created though? Do you use Level.parse()? The Logger.setLevel() requires a java.util.logging.Level argument so the level would need to be created before that method is invoked.

We use LogContext.getLogContext().getLevelForName(value.toUpperCase(Locale.ROOT));

@jamezp
Copy link
Member

jamezp commented Dec 12, 2023

That's really strange then. That should definitely work. @dmlloyd Do you have any ideas?

I don't understand where the org.jboss.logmanager.Level.ALL would come from as the LogContext.getLogContext().getLevelForName("ALL") should return java.util.logging.Level.All.

@dmlloyd
Copy link
Member

dmlloyd commented Dec 12, 2023

It definitely should work as it is. We have tests for it too IIRC, so maybe something GraalVM-specific is happening?

@dmlloyd
Copy link
Member

dmlloyd commented Jan 4, 2024

This ended up being fixed by quarkusio/quarkus#37873 - it was an error in how the field was registered to the native image. Problem solved!

@dmlloyd dmlloyd closed this Jan 4, 2024
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.

Native image build fails with -Dquarkus.log.min-level=ALL
3 participants