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

logging to DEBUG the source of configuration values (whether from POM or sysenv) #88

Merged
merged 4 commits into from
Oct 16, 2021

Conversation

mccartney
Copy link
Contributor

Solving #82.
i.e. logging to DEBUG level a simple information on where did a specific configuration property came from - either from POM or the system environment variable.

@mccartney
Copy link
Contributor Author

Please advise on how you would like to have it tested. Other than running mvn test I didn't test it in any sense.

@slawekjaranowski
Copy link
Member

For test you can use https://www.simplify4u.org/slf4j-mock/ and add simply assertions to existing tests PGPKeyInfoTest#keyFromFileAllPropertiesSet, PGPKeyInfoTest#keyDataFromEnv

@slawekjaranowski slawekjaranowski added the enhancement New feature or request. label Oct 14, 2021
Comment on lines -256 to -257
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If slf4j-simple was present it got in the way - i.e. the logger for PGPKeyInfo got set to SimpleLogger

@mccartney
Copy link
Contributor Author

PTAL @slawekjaranowski

pom.xml Outdated Show resolved Hide resolved
@slawekjaranowski slawekjaranowski linked an issue Oct 16, 2021 that may be closed by this pull request
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@slawekjaranowski slawekjaranowski merged commit b8a8c07 into s4u:master Oct 16, 2021
@slawekjaranowski
Copy link
Member

@mccartney thanks

@mccartney mccartney deleted the debug-source-of-configuration branch October 16, 2021 12:34
@slawekjaranowski
Copy link
Member

@mccartney - if you wish you can add yourself to contributor list in pom.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Development

Successfully merging this pull request may close these issues.

Key configuration source in debug level
2 participants