-
Notifications
You must be signed in to change notification settings - Fork 306
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
feature(config-api): Make MPCONFIG in TranslatedConfigView debugable / FISH-1079 #5129
Conversation
1. When no value can be found and no default has been given, a warning should be printed, so we have a useful error message. Important e. g. to track causes when DB connections fail, etc. 2. When a value has been found, it might be the wrong one due to wrong ordinal config, human mistake, etc etc. Enabling debugging with the TranslatedConfigView will reveal the origin of a value. Closes payara#5126
jenkins test please |
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.
Just a quick change, to better align with our code conventions
nucleus/admin/config-api/src/main/java/org/glassfish/config/support/TranslatedConfigView.java
Outdated
Show resolved
Hide resolved
nucleus/admin/config-api/src/main/java/org/glassfish/config/support/TranslatedConfigView.java
Outdated
Show resolved
Hide resolved
nucleus/admin/config-api/src/main/java/org/glassfish/config/support/TranslatedConfigView.java
Outdated
Show resolved
Hide resolved
Rename variable Co-authored-by: Alan <[email protected]>
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.
Spacing
nucleus/admin/config-api/src/main/java/org/glassfish/config/support/TranslatedConfigView.java
Outdated
Show resolved
Hide resolved
m3.reset(stringValue); | ||
Logger.getAnonymousLogger().fine("Found property '"+matchValue+"' in source '"+cValue.getSourceName()+"' with ordinal '"+cValue.getSourceOrdinal()+"'"); |
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.
Logger.getAnonymousLogger().fine("Found property '"+matchValue+"' in source '"+cValue.getSourceName()+"' with ordinal '"+cValue.getSourceOrdinal()+"'"); | |
Logger.getAnonymousLogger().fine("Found property '" + matchValue + "' in source '" + cValue.getSourceName() + "' with ordinal '" + cValue.getSourceOrdinal() + "'"); |
nucleus/admin/config-api/src/main/java/org/glassfish/config/support/TranslatedConfigView.java
Outdated
Show resolved
Hide resolved
nucleus/admin/config-api/src/main/java/org/glassfish/config/support/TranslatedConfigView.java
Outdated
Show resolved
Hide resolved
…pport/TranslatedConfigView.java Spacing
jenkins test please |
Oh! That went smooth... So I guess the idea was a good fit. Thanks for fixing the style issues. @AlanRoth I'll add some docs for this in the docs repo. |
feature(config-api): Make MPCONFIG in TranslatedConfigView debugable / FISH-1079
…5126-mpconfig-msg feature(config-api): Make MPCONFIG in TranslatedConfigView debugable / FISH-1079
Description
Closes #5126
Microprofile Config based variable substitution in TranslatedConfigView:
should be printed, so we have a useful error message. Important e. g.
to track causes when DB connections fail, etc.
ordinal config, human mistake, etc etc. Enabling debugging
with the TranslatedConfigView will reveal the origin of a value.
(Thx, MicroProfile Config API 2.0!!!)
Important Info
This is a demo to outline how this could be done. Might need polishing.
Testing
New tests
None yet.
Testing Performed
None yet, except for the test cases already present.
Testing Environment
AdoptJDK 11.0.9, Maven 3.6, Linux (Fedora 33)
Documentation
None yet.
Notes for Reviewers
None so far.