-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix Wrong/Missing Log Levels in application.properties #105
Conversation
For Quarkus side please use the PR redhat-developer/quarkus-ls#370 too |
e723eac
to
94b8050
Compare
This PR gives the capability to manage JUL Level with Spring Boot Metadata "hints" mechanism. The current mechanism uses https://github.com/eclipse/lsp4mp/blob/master/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/resources/org/eclipse/lsp4mp/model/values/quarkus-values-rules.json I removed this file and now Level are managed by the MicroProfile JDT instead by MicroProfile LS. It provides several capabilities:
Here a demo with 1 and 2). To test it create a MicroProfile project with Open Liberty and create the following class: package com.example.demo.resilient;
import java.util.logging.Level;
import org.eclipse.microprofile.config.inject.ConfigProperty;
public class Test {
@ConfigProperty(name="mylog.level")
private Level level;
} and see the follwing demo: |
074efa4
to
c86d291
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. There was just a class that I didn't understand that I think could be documented better.
package org.eclipse.lsp4mp.commons.metadata; | ||
|
||
/** | ||
* A provider for a value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what this class represents. Specifically, I don't know what parameters
represents in relation to providing a value for a property. I think it could be better explained in the Javadoc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right, I will do that. I used the same concept that Spring Boot metadata https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html#configuration-metadata-hints-attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@datho7561 I have add links to Spring Boot metadata. Please tell me if it's enough.
...ipse.lsp4mp.ls/src/test/java/org/eclipse/lsp4mp/services/ApplicationPropertiesHoverTest.java
Outdated
Show resolved
Hide resolved
8e1fa62
to
5871c49
Compare
f7a8775
to
d9813bb
Compare
See redhat-developer/vscode-quarkus#315 Signed-off-by: azerr <[email protected]>
Thanks @datho7561 for your great review! |
See redhat-developer/vscode-quarkus#315
Signed-off-by: azerr [email protected]